runscript.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:AutoSleepScorerDev 作者: skjerns 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号