你有没有注意到你的“组件”完全是原始信号的比例和颠倒?这是因为你不能得到比信号更多的成分。在
您需要执行以下步骤:将所有EEG通道输入ICA
手动移除包含眨眼或其他伪影的组件
用反变换重构
让我们详细了解第2步:为什么要手动删除组件?
伊卡对眨眼一无所知。它根据统计测量将信号分成不同的分量。如果幸运的话,这些部件中的一些看起来像是眨眼。在
到目前为止还可以,但真正的问题是没有定义组件的顺序。运行ICA,您可能会发现组件1包含眨眼。再次运行它,它们在组件3中。同样,它们都在第2和第5部分中。。。在
没有办法预先知道要移除哪些组件和多少个组件。这就是为什么每次运行时都需要手动告诉算法。在
在类似这样的代码中:# Use all channels - they will contain eye blinks to varying degrees
X = f1ep1_data[:, :]
# run ICA on signal
ica = FastICA(n_components=x.shape[1]) # we want *all* the components
ica.fit(X)
# decompose signal into components
components = ica.fit_transform(X)
# plot components and ask user which components to remove
# ...
remove_indices = [0, 1, 3] # pretend the user selected components 0, 1, and 3
#