Using ICA for EEG noise filtering

Source: Internet
Author: User

Data preprocessing

Assume a 6-channel EEG (4-channel eeg+2 channel EOG) that generates Ndarray or matrix S,row for time Point,col as a channel. To standardize S:

S/= s.std (axis=0)

ICA analysis

Module Import:

 from Import Fastica

To build an ICA object, select fractions:

ICA = Fastica (n_components=6)

(The composition is randomly arranged, using random_state for repeatability analysis if necessary)

s corresponds to the composition of S_:

S_ = Ica.fit_transform (S)

The corresponding mix matrix is:

Ica.mixing_

Filter noise

For s_ mapping, X is time point,y for each component. Determine the source of the suspected noise.

For example, get:

Suppose 5th, 60% is divided into sources of noise, delete the ingredient, rebuild the fix s:corr_s

corr_s = Np.dot (s_[:,: 4], Ica.mixing_. T[:4,:])

Results

Filter before noise

After filter noise

Complete

Using ICA for EEG noise filtering

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.