本文整理汇总了Python中app.App.build_features_data方法的典型用法代码示例。如果您正苦于以下问题:Python App.build_features_data方法的具体用法?Python App.build_features_data怎么用?Python App.build_features_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app.App
的用法示例。
在下文中一共展示了App.build_features_data方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: str
# 需要导入模块: from app import App [as 别名]
# 或者: from app.App import build_features_data [as 别名]
for param in params:
if variable=="P": P = param
if variable=="D": D = param
if variable=="N": N = param
if variable=="K": K = param
id_combin = "-".join([ str(vn)+str(v) for v,vn in list(zip(comb, combo_name)) ]) + "-Agg"+str(agg)
vals.append(param)
gb.K = K
signalsValues, modes = ArtificialData(noise=N, ptrn=P).run()#parts=30) # VS, ES, APP, BPP, ECT
sigReaders = [ SignalReaderArtificial(signame="Signal"+str(i), sigvalues=values, modes=modes) for i,values in enumerate(signalsValues) ]
app = App(sigReaders)
DATA, AXES_INFO = app.build_features_data()
clust = Clustering(DATA, scale=True, features=None).gmm(k = 3)#k=gb.K) # kmeans, dpgmm, gmm
app.init_clust_tracker(clust, AXES_INFO)
PLOT_PATH = gb.PLOT_PATH + str(id_combin) + '/' + str(param) + '/'
if not os.path.exists(PLOT_PATH): os.makedirs(PLOT_PATH)
path = PLOT_PATH+str(id_combin)+'_'
app.logInformations( id_combin=id_combin, clust=clust, path=path )
#(ari_fps, ari_sps), (ami_fps, ami_sps), (ho_fps, ho_sps), (com_fps, com_sps), (vm_fps, vm_sps) = app.tracking(path=path)
STATS, RESULTS = app.tracking(path=gb.PLOT_PATH, )
times_fsp, axes_fsp,labels_fsp,times_ssp,axes_ssp,labels_ssp = RESULTS
(ari_fps, ari_sps), (ami_fps, ami_sps), (ho_fps, ho_sps), (com_fps, com_sps), (vm_fps, vm_sps) = STATS
FSP_ari.append(ari_fps); SSP_ari.append(ari_sps)
FSP_ami.append(ami_fps); SSP_ami.append(ami_sps)
FSP_ho.append(ho_fps); SSP_ho.append(ho_sps)