小编Ped*_*dro的帖子

使用 ICA 从 EEG 信号中去除眨眼

我是 scikit-learn 的新手,但我正在尝试消除单个 EEG 通道内的眨眼(噪声峰值)。我在互联网上搜索过,但只看到使用 MNE、PyEEG 或其他 Python 模块的更复杂的读数。我只想要一些简单且仅依赖于 sklearn 的东西。这是我的代码:

#The channel containing some eye-blinks
X = f1ep1_data[:,[4]]

#run ICA on signal
ica = FastICA(n_components=2)
ica.fit(X)

#reconstruct signal with independent components
components = ica.fit_transform(X)
X_restored = ica.inverse_transform(components)

fig1 = plt.figure()
plt.subplot(3,1,1)
plt.title("Original signal")
plt.plot(f1ep1_timescale, X)

plt.subplot(3,1,2)
plt.title("Components")
plt.plot(f1ep1_timescale, components)

plt.subplot(3,1,3)
plt.title("Signal Reconstructed")
plt.plot(f1ep1_timescale, X_restored)
plt.draw()
Run Code Online (Sandbox Code Playgroud)

这是代码的结果

我期待的是分成两个部分,一个更清晰的 EEG 信号和眨眼。我无法弄清楚是什么问题。有人可以伸出援助之手吗?

python time-series scikit-learn

2
推荐指数
1
解决办法
2008
查看次数

标签 统计

python ×1

scikit-learn ×1

time-series ×1