def feat_ann(c=0):
batch_size =700
feats_eeg = scipy.stats.zscore(tools.feat_eeg(data[:,:,0]))
feats_emg = scipy.stats.zscore(tools.feat_emg(data[:,:,1]))
feats_eog = scipy.stats.zscore(tools.feat_eog(data[:,:,2]))
feats_all = np.hstack([feats_eeg, feats_emg, feats_eog])
results = dict()
r = cv(feats_eeg, target, groups, models.ann, name = 'eeg', stop_after=15,batch_size=batch_size, counter=c, plot=plot)
results.update(r)
r = cv(np.hstack([feats_eeg,feats_eog]), target, groups, models.ann, name = 'eeg+eog',batch_size=batch_size, stop_after=15, counter=c, plot=plot)
results.update(r)
r = cv(np.hstack([feats_eeg,feats_emg]), target, groups, models.ann, name = 'eeg+emg',batch_size=batch_size, stop_after=15, counter=c, plot=plot)
results.update(r)
r = cv(feats_all, target, groups, models.ann, name = 'all',batch_size=batch_size, stop_after=15, counter=c, plot=plot)
results.update(r)
with open('results_electrodes_feat.pkl', 'wb') as f: pickle.dump(results, f)
评论列表
文章目录