当前位置: 首页>>代码示例>>Python>>正文


Python Analyzer.reset_states方法代码示例

本文整理汇总了Python中analyzer.Analyzer.reset_states方法的典型用法代码示例。如果您正苦于以下问题:Python Analyzer.reset_states方法的具体用法?Python Analyzer.reset_states怎么用?Python Analyzer.reset_states使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在analyzer.Analyzer的用法示例。


在下文中一共展示了Analyzer.reset_states方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: range

# 需要导入模块: from analyzer import Analyzer [as 别名]
# 或者: from analyzer.Analyzer import reset_states [as 别名]
            testData = sm[testDataOffset:(testSize + trainingSize)]
        else:
            testDataOffset = 0
            trainingData = sm
            testData = sm
    else:
        testDataOffset = 0
        trainingData = sm
        testData = sm

    analyzer.train(trainingData)
     
    trainingFeatures = analyzer.execute(trainingData)
    testFeatures = analyzer.execute(testData)
    #testFeatures = trainingFeatures
    analyzer.reset_states(True)
    testFeatures2 = []
    for timeIndex in range(0, len(testData), 1):
        testFeatures2.append(analyzer.execute([testData[timeIndex]])[0])
        analyzer.reset_states(False)
    #testFeatures2 = analyzer.execute(testData)
    testFeaturesCombined = np.append(testFeatures, testFeatures2, 1)
    print "testFeaturesCombined: " + str(len(testFeaturesCombined.T)) + " x " + str(len(testFeaturesCombined.T[0]))
    #plotter.plot_features_graphs("dummy", coordm, testFeaturesCombined, 8, sm, 0)
    
    title = analyzer.description + ", data: " + str(len(sm)) + ", source: " + sourceDescription

    activation_locations = place_cell_reliability.get_activation_mean_locations(coordm, trainingFeatures)
    place_cell_reliability.average_cost(coordm, testFeatures, activation_locations)

#     plt.ion()
开发者ID:de-git,项目名称:ml,代码行数:33,代码来源:place_cells_sfa.py


注:本文中的analyzer.Analyzer.reset_states方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。