Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Artifact Detection & Removal:

Programming Languages Analysis


Report - CAN Lab
Daniella Pombo
Artifact Detection &
Removal
Artifact Removal

● Categories:
1. Frequency domain methods: assumes not all EOG Artifact signals effect scalp sample sites
■ Leads to exclusion of data segments
2. Source localization methods: attempts to quantify effect to which artifact would propagate
to scalp sites
■ ICA, BSS
■ Editing of segments via removal of artifact
● Assumptions:
○ Eye artifacts and EEG are independent
○ EOG and EEG are bidirectional interference
● Data format:
○ Rows - EEG channels
○ Columns - time point measurements
Distortion
1. Undercorrection - If artifacts are
missing in detection phase,
artifacts will remain in data
2. Overcorrection - If artifacts and
noise free signals are detected
and removed or if data does not
include artifacts
No Free Lunch Theorem

● There is no one classifier/estimator that's best with various data sets


○ = will not know which one is the most efficient until classifiers are applied and results are
analyzed

● There is no universally agreed upon method for artifact detection and


removal. Thus, it is difficult to identify any effective classifier methods for
artifact removal with a lack of universally determined artifact removal
criterion.
● Unsupervised learning statistical machine learning algorithms are difficult to analyze effectiveness
and results.
Blind Source Separation (BBC)

● Method for Signal processing ● 2 Subcategories of Method:


○ Linear Model ○ Higher Order Statistics:
○ Neural sources estimator ■ Use of weights and eigen
■ Uses unsupervised learning matrices
■ Does not require prior ■ Types: ICA
information ○ Second Order Statistics (SO):
○ Cons: difficult/cannot quantify its ■ Use of covariance matrix
results ■ Types: PCA, Algorithms for
■ There also does not seem to be multiple unknown signals
an academic understanding of extraction (AMUSE), Second
optimal artifact removal ---no order blind identification (SOBI)
universally agreed upon criterion
for artifact removal
Principal Component Analysis (PCA)

● Commonly used BSS algorithms


● Composed of use of eigenvalues of covariance matrix
● Functionality: Looks for spatially orthogonal components
○ Use of orthogonal transformation to define principle (uncorrelated) components (PC)
■ Implemented via singular value decomposition
○ Applies dimensionality reduction = preferable for large datasets
○ Computes variance and remaining variance for components
● Cons:
○ Unlikely that all variables (EEG and artifacts) are spatially orthogonal
○ Constrained by orthogonality of components
○ Does not discern/identify variations in amplitudes vs variations in latency
Independent Component Analysis (ICA)

● Optimization approach
● Functionality: Separates linearly mixed sources into independent components (IC’s) via linear
regression
○ Preforms independent component decomposition and analysis
○ Finds noise free EEG IC and artifact IC
○ Reduces artifact IC weights to 0
■ = Nullifies/disregards artifact IC’s
○ Uses regluationzation and normalization to reduces weights and computational complexity
○ Minimizes Gaussianity of projection on all axises (‘Whitening”)
● Goal: find maximal independent components
○ Determine weights (describe noise free EEG and EOG)
■ X estimate = W*S
● S = contaminated original EEG data set
● X = IC’s
■ Linear model of S = M*X where M is the linear weight of IC’s and X are IC’s
ICA Continued

● Requirements:
○ Whitening (preprocessing of data)
■ Remove correlations
■ Linear change of coordinate
■ Rotates data and makes sphere like shape in scatter plot
○ Large amounts of data
● Assumptions:
○ Signal sources of noise free EEG and artifact are instantaneously linear mixtures that can be
decomposed into IC’s
○ Number of components < = number of channels
○ Summation of signal sources are linear
○ Artifacts and noise free EEG are spatially fixed across time
○ Sources are non Gaussian
ICA Continued

● Best suited for scenario:


○ Source signals are independent and instantaneously mixed
○ Number of components < = number of channels
■ Observation signal dimension >= source signal
■ At least 20 channels
○ Sources are non -Gaussian / one source are Gaussian
● Cons:
○ Does not recover all amplitudes from source
○ Length of data should at minimum be constant times the square of the number of channels
● Types of algorithms:
○ ADJUST makes use of joint spatial and temporal features
○ Fully Automated Statistical Threshold for EEG Artifact Rejection (FASTER)
Linear Regression

● Method referred to as ‘Gold Standard’


● Assumptions:
○ Each mixed EEG channel can be defined as linear model of the sum of noise-free EEG signal and
fraction of source artifact available through EOG electrodes
○ EEG does not interfere w/ EOG signals
○ “Each channel is cumulative sum of pure EEG data and proportion of artifact” [15]

● Requirements:
○ Data must include Exogenous reference channels - Electrooculogram (EOG)
● Pros:
○ Does not have number of channels constraints (can use minimum without effect)
Linear Regression Continued

● Goal: Find and define relation between noise free EEG and artifact signals
○ Find regression coefficients (weight matrix) that describe the correlation between EOG artifact and
noise free EEG channel
■ E = S - WB
● S = Original mixed EEG signal
● E = noise free EEg w/out artifact
● B = artifact
● W = weight matrix
Other Methods

● Wavelet transform: transformation into time and frequency domain


● Adaptive Filtering: reduces EOG artifacts similar to linear regression but with varying weights over
time
○ Use of optimization algorithms such as least mean squares (LMS) or Recursive Least Squares
Algorithm (RLMS) for weight update
● Hybridization of various types, etc.
○ Use of Support Vector Machine in collaboration with other Methods
Programming Languages
BESA

● Tools:
○ Raw data review
○ Data pre processing
○ Artifact rejection and correction
○ Data averaging and ERP analysis
○ 2D and 3d Mapping
○ Source Analysis
○ Time frequency analysis
● Run independently of EEG and MEG obtainiment
● Analysis software w/ direct MatLab interface connection (Path)
● Has artifact correction Module
BESA Artifact Correction Module

● ***Warns of inevitable artifact distortion***


● Defined by spatial and topographical components
○ Uses Spatial filtering method, requires defined spatial topographies whether manually or
through method
● General approach:
○ Identify artifact topography via manual or automatic detection
○ Identify noise free EEG signal topographies
○ Reconstruct via spatial filter creating new matrices
○ Subtract original data matrix by newly constructed matrix to create cleaned data set
BESA Artifact Correction Methods
1. Adaptive artifact correction *BESA recommended*
○ Automatic Artifact Correction: predefined source model
■ Has 3 topographies HEOG, VEOG and Blink w/ 12 regional sources for different brain
regions, and optional 3 EOG signal displays
○ Performs PCA on segments that are filtered out
■ Filters when:
● Correlation between EOG and noise free EEG is above certain threshold
● Signal amplitudes are below given threshold
○ Decomposes EEG into noise free and EOG components via linear model
○ Subtracts EOG from original EEG
○ Influenced by linear regression and PCA models
2. Surrogate method
3. Subspace projection (SSO)
○ Discourage use - Can led to largest distortion
MatLab

● Has various neuroscience analysis


M/EEG toolboxes
○ EEGLAB
○ EyeCatch
○ FieldTrip
EyeCatch

● Automated EOG Artifact ICA algorithm based on spatial distribution of scalp maps
○ Included in Measurae Projection Toolbox (MPT)
○ Performs ICA with focus on scalp map features
○ Comparable to CORRMAP
■ Found to have .993 area under ROC curve: “Demonstrating it has high sensitivity and
specificity” [9].
○ Compares input to an EOG IC scalp map database (has more than .5 million samples)
EEGLAB

● Offers various ICA algorithms


○ FastICA, Rumica, Jader
○ “We are satisfied the InfoMax ICA (runica/binica) gives stable decomposition with up to
hundreds of channels and therefore we can recommend its use particular in its fastest binary
form” [1].
○ Requires kN^2 data samples
■ N is the number of channels
■ k is a coefficient
● Encourage use of PCA when data does not fulfill size requirement for ICA
FieldTrip

● Open source software for M/EEG analysis


○ Does not have graphical user interface
○ Allows for creation of unique analysis protocols
● Offers:
○ Preprocessing
○ Advanced analysis
○ Source reconstruction via dipoles
○ Nonparametric statistical testing
● Supports BDS (BioSemi)
FieldTrip Artifact Detection

● 2 Artifact Detection Methods:


○ Manual via investigator
○ Automatic via Methods

● “There is no single most optimal manner to detect artifacts: it just


depends on data properties and your own preferences” [6].
FieldTrip Artifact Methods

● Manually:
○ User identifies segments that are obstructed via artifact
○ Results in list of segments w/ artifacts
● Automatic:
○ “Although automatic artifact detection algorithms work efficiently for well-known artifacts in
well-behaved data, you should not use automatic detection functions as your defaults method”
[6].
○ Composed of filtering and channeling combination techniques
■ Various linear and non linear filtering
■ Data padding options
○ Functions:
■ ft_artifact_clip, ft_artifact_ecg, ft_artifact_threhosld, ft_artifact_jump, ft_artifact_muscle,
ft_artifact_avalue
○ Offer PCA, ICA, etc.
MNE Python

● Open source software package ● Offers:


○ Preprocessing
● Integrated w/: NumPy, SciPy, Pandas, ■ Filtering
Matplotlib, Mayavi, Nibabel, SkLearn ■ Noise suppression
● Data structures: Raw, Epoches, Evoked ■ Data cropping
○ Evoked: averaged segmented data ■ Visual data exploration
(epochs) ○ Source localization
○ Raw: continuous data ○ Statistical analysis
○ Time frequency analysis
● Supports reading Biosemi BDF ○ Nonparametric statistics
○ Connectivity estimation
● Space (memory), and computational efficient ○ Multivariate pattern analysis (decoding--- Machine
learning)
○ Estimation of functional connectivity between
regions
MNE Python Artifact Removal
● Categories of Artifact Removal Methods:
○ Exclude segment
○ Minimization of artifact effect w/ in segment
■ Can be offered automic/ semi-automatically via various methods
● Types of automatic artifact removal:
○ SSP, temporal ICA, linear regression, filters, minimum norm estimate, mixed norm estimates,
time frequency mixed norm estimates, lambda Map (sparse Bayesian Learning)
■ Fitlers: faster fourier transform, finite impulse response, infinite impulse response, and
butterworth
● MNE ICA:
○ Defined by distribution criteria such, Kurtosis, skewness or variance
○ Offers Fast ICA, Picard, Infomax, and extended InfoMax
○ Can visualize via trellis plot
○ Uses L2 norm regularization
● Offers PCA and Zero phase component analysis (ZCA) whitening techniques
Matlab vs Python

● There are more citations for Matlab EEGLab and FieldTrip in comparison to MNE Python [2]
Future:

● Questions:
○ How EEG data was preprocessed?
■ Manually or w/ semi-automatic artifact detection methods?
○ Was there use of EOG electrodes?

● Learn more about Python and Matlab EEG analysis methods


References
[1] (2018). Chapter 09: Decomposing Data Using ICA. In Swartz Center for Computaitonal Neuroscince https://sccn.ucsd.edu/wiki/Chapter_09:_Decomposing_Data_Using_ICA
[2] (2018). EyeCatch. In EyeCatch Github https://github.com/bigdelys/eye-catch.
[3] (2019). In MNE webpage https://mne.tools/stable/index.html.
[4] (2019). In NIPY webpage https://nipy.org/index.html.
[5] (2019). Use Independent Component Analysis (ICA) to Remove EOG Artifacts. In
http://www.fieldtriptoolbox.org/example/use_independent_component_analysis_ica_to_remove_eog_artifacts/.
[6] (2019). BESA Research Artifact Correction. In BESA Research Manual http://wiki.besa.de/index.php?title=BESA_Research_Artifact_Correction.
[7] Allen, J. J.B. Advanced Signal Processing II. In http://apsychoserver.psychofizz.psych.arizona.edu/JJBAReprints/PSYC501A/pdfs2013/Lecture_14_Advanced_II_2013.pdf .
[8] Bigdely-Shamlo, N., Kreutz-Delgado, K., Kothe, C., Makeig, S. (2014). EyeCatch: Data-Mining over Half a Million EEG Independent Components to Construct
Fully-Automated Eye-Component Detector. In IEEE doi: 10.1109/EMBC.2013.6610881.
[9] Clemens Brunner. (2018). In Clemens Brunner Github https://cbrnr.github.io/.
[10] Delorme, A. Independent Component Analysis for Dummies. In http://arnauddelorme.com/ica_for_dummies/.
[11] Delorme, A., Scott, M. In EEGLab Tutorial Quick Tutorial on Rejecting Data Artifacts wit EEGLab
http://www.indiana.edu/~pcl/busey/temp/eeglabtutorial4.301/quickrej.html.
[12] Dimigen, O. (2018). Optimized ICA-Based Removal of Ocular EEG Artifacts From Free Viewing Experiments. In Biorxiv
https://www.biorxiv.org/content/10.1101/446955v1.full. doi: https://doi.org/10.1101/446955.
[13] Gramfort, A., Luessi, M., Larson, E., Engemann, D. A., Strohmeier, D., Brodbeck, C., Goj, R., Jas, M., Brooks, T., Parkkonen, L. (2013). MEG and EEG Data Analysis with
MNE-Python. In Frontiers in Neuroscience.
[14] Jiang, X., Bian, G. Tian, Z. (2019). Removal of Artifacts from EEG Signals: A Review. In Sensors (Basel). doi: 10.3390/s19050987.
[15] Oosugi, N., Kitajo, K. Hasegawa, N., Nagasaka, Y., Okanoya, K., Fujii, N. (2017). A New Method for Quantifying the Performance of EEG Blind Source Separation
Algorithms by Referencing a Simultaneously Recorded ECoG Signal..In Neural Networks. doi: https://doi.org/10.1016/j.neunet.2017.01.005.
[16] Scherg, M. P. Berg, Hoechstetter, K. (2010). BESA Research Tutorial 5: Artifact Correction. In www.besa.de.
[17] Subramaniyam, N. (2018). Getting Rid of Eye Blink in the EEG. In https://sapienlabs.org/getting-rid-of-eye-blink-in-the-eeg/.
[16] Zhou, W., Gotman, J.,(2009). Automatic Removal of Eye Movement Artifacts From EEG using ICA and the Dipole Model. In Progress in Natural Science. doi :
https://doi.org/10.1016/j.pnsc.2008.11.013.

You might also like