
EEG相关
沃·夏澈德
今天的明天是后天的昨天。----茨鲍勒·程德
展开
-
MNE绘制自定义通道位置及名字的脑地形图
【代码】MNE绘制自定义通道位置及名字的脑地形图。原创 2023-09-18 19:02:04 · 725 阅读 · 0 评论 -
共空间模式 (CSP)python 实现
共空间模式 (CSP)python 实现原创 2022-10-03 16:45:49 · 1340 阅读 · 0 评论 -
容积传导问题
原创 2022-03-07 19:37:26 · 407 阅读 · 0 评论 -
BCI IV 2b 近期研究动态
BCI4-2b研究进展论文年份方法数据选取精度(%)kappa备注Feature Extraction of EEG Signal by Power Spectral Density for Motor Imagery Based BCI2021PSD;LDA按每个sub来,各做各的。没有说明训练集和测试集的划分,言语间应该是按比赛那边的来。740.52RFNet: Riemannian Fusion Network for EEG-based Brain-原创 2021-11-18 17:28:42 · 1154 阅读 · 1 评论 -
pywt 安装
pip install PyWavelets原创 2021-11-15 10:54:15 · 2833 阅读 · 0 评论 -
python 绘制 频谱图
效果图t = np.arange(0,time,1.0/sampling_rate)wavename = 'morl' # "cmorB-C" where B is the bandwidth and C is the center frequency.totalscal = 64 # scale fc = pywt.central_frequency(wavename) # central frequencycparam = 2 * fc * totalscalscale原创 2021-11-15 10:52:42 · 7589 阅读 · 2 评论 -
巴特沃斯滤波器 python代码
网上找的def butter_bandpass(lowcut, highcut, fs, order): nyq = 0.5*fs low = lowcut/nyq high = highcut/nyq b, a = signal.butter(8, [low, high], 'bandpass') return b, adef butter_bandpass_filter(data, lowcut, highcut, fs, order): b原创 2021-10-13 19:42:37 · 3999 阅读 · 3 评论 -
scipy.signal.filtfilt 的使用方法以及参数解释
from scipy import signalb,a=signal.butter(8,[(8*2/128),(32*2/128)],'bandpass')buffer_x_test=signal.filtfilt(b,a,data,axis=0)butter:过滤8-32Hz的信号,128为采样率,8是阶数,’basspass‘是带通滤波。filtfilt:数据格式不系不大,关键axis得对应到time那一维就好。...原创 2021-10-13 17:06:00 · 3427 阅读 · 3 评论 -
CSP学习资料与精简总结
其实是一种降维方法,将原始数据投影到CSP空间中,在该投影方向上,一类信号的方差被 极大化,一类极小化。学习资料:运动想象中共空间模式算法(CSP)的实现_zhoudapeng01的专栏-优快云博客_csp算法...原创 2021-09-28 10:02:54 · 498 阅读 · 0 评论 -
EEG数据预处理的一些坑,模型loss=nan的原因与解决方法
在使用深度学习模型对数据进行分类时,出现loss=nan的现象。原因:数据中有接近0的坏数据或者Nan例如:解决方法:去掉就好nan的检测与去除可以参考此处。原创 2021-09-23 19:44:29 · 455 阅读 · 0 评论 -
mne计算CSP
# get CSP featurefrom mne.decoding import CSPcsp = CSP(n_components=10, reg=None, log=True, norm_trace=True)csp_train = csp.fit_transform(train_data, train_label)'''其中 train_data 的格式为[trial,time,channel];train_label的为[trial,]'''详情可以参考mne官网 文档.原创 2021-09-21 23:56:13 · 865 阅读 · 1 评论 -
多条eeg数据对比图绘制
'''画图,输入多条数据,进行可视化对比。建议10以内。'''import plotly.graph_objs as goimport numpy as npfrom plotly.subplots import make_subplotsdef plot_various_chns(data,names = []): ''' 画图,输入多条数据,进行可视化对比。建议10以内。 @Input: data: list,要画的数据 .原创 2021-09-20 21:27:00 · 574 阅读 · 0 评论 -
信号数据C0 Complexity计算
参考论文:Thestudy ofc0complexityonepilepticabsenceseizuredef C0_complexity(single): ''' 计算C0复杂度 ''' x = fft(single) N = x.shape[0] avgx = np.average(x) # 计算幅度谱的平均值 new_x = [] for i in x: if abs(i) &g...原创 2021-09-16 16:13:34 · 665 阅读 · 0 评论 -
信号数据shannon entropy计算
import mathimport numpy as npdef shannon_entropy(single,k): ''' single:1-D信号 k: 分多少个bin ''' numofx = single.shape[0] maxV = np.max(single) minV = np.min(single) bin = np.linspace(minV,maxV,k+1) bin_numx = [0].原创 2021-09-16 16:10:41 · 439 阅读 · 0 评论