Identify Uncorrelated Channels¶
The uncorrelated_channels step identifies and marks EEG channels as uncorrelated if
their per-epoch correlation coefficient with neighboring channels (computed across samples)
is consistently a low outlier relative to the corresponding coefficients of other channels.
This step operates in two stages:
For each epoch, channels whose correlation coefficient with neighboring channels (across samples) is identified as a lower outlier are flagged.
a channel is marked as uncorrelated if it is flagged in more more than
flag_critproprortion of epochs.
Examples¶
noisy_epochs:
flag_crit: 0.2
outlier_method: quantile
outliers_kwargs:
k: 6
lower: 0.25
upper: 0.75
Parameters¶
flag_critfloat, default=0.2Proportion of epochs in which this channel must be flagged during for the channel to be flagged.
outlier_methodstr, default=’quantile’Method used to identify outlier epochs. Options are
'quantile','trimmed', or'fixed'.'quantile'Identifies outliers using asymmetric, quantile-based thresholds. For a given epoch, channels are flagged if their standard deviation lies outside
μ - k * (μ - q_low)where
μis the mean standard deviation across channels,q_lowis the lower quantile specified byoutliers_kwargs['lower'], andkis a scaling factor.This method is robust to skewed distributions and is suitable when channel variability is not symmetrically distributed.
'trimmed'Identifies outliers using robust statistics by computing the trimmed mean and trimmed standard deviation across channels. For a given epoch, channels with standard deviation values outside
trimmed_mean - k * trimmed_stdare flagged.
This method reduces the influence of extreme artifacts while preserving sensitivity to moderately noisy channels.
'fixed'Identifies outliers using fixed, absolute thresholds. For a given epoch, channels with standard deviation values outside the thresholds (in volts) specified by
outliers_kwargs['lower']are flagged.
outliers_kwargsdictAdditional keyword arguments specific to the chosen outlier detection method.
- For
'quantile': kfloat, default=6Scaling factor for the quantile-based thresholds.
lowerfloat, default=0.25Lower quantile.
upperfloat, default=0.75Upper quantile.
- For
- For
'trimmed': kfloat, default=3Scaling factor for trimmed standard deviation thresholds.
- For
Notes¶
The trimmed and fixed methods are not robustly tested in the current codebase.
Please use with caution and validate results carefully.