ICA and Components#

Decomposition, component classification, and component measures.

Low-level decomposition helpers accept channel/component-major matrices. The runica_ml2, runica_mlb, and runicalowmem compatibility names all delegate to the maintained runica implementation, preventing numerical drift between historical copies of the infomax engine. runica and runicalowmem accept EEGLAB positional name/value pairs, such as runica(data, "extended", 1), in addition to keywords. runica.m line 205 sets DEFAULT_RESETRANDOMSEED = true (clock reseed at lines 816-817), while the help at lines 48-50 says the default has been 'off' since 2015. EEGPrep follows the help text: an omitted rndreset is off and uses RandomState(5489), the same MT19937 stream as rng(5489, 'twister') (pythoncompat, line 814), rather than the legacy rand('state', 0) stream at line 819. varsort and zica return zero-based component and sample indices.

eegprep.ICL_feature_extractor(EEG[, ...])

Extract features for ICLabel classification.

eegprep.ICADefaults(ICABINARY[, ...])

Stable constants historically introduced by EEGLAB's icadefs script.

eegprep.compvar(data, act, winv, compnums)

Back-project components and compute percent variance accounted for.

eegprep.eeg_amica(EEG[, posact, sortcomps, ...])

Perform ICA decomposition using AMICA (Adaptive Mixture ICA).

eegprep.eeg_autocorr(EEG[, pct_data])

Compute autocorrelation of ICA components.

eegprep.eeg_autocorr_fftw(EEG[, pct_data])

Compute autocorrelation of EEG ICA components using FFT.

eegprep.eeg_autocorr_welch(EEG[, pct_data])

Compute autocorrelation of EEG ICA components using Welch method.

eegprep.eeg_getica(EEG[, comp])

Return stored or recomputed ICA component activations.

eegprep.eeg_icalabelstat(EEG[, threshold, ...])

Return and optionally print ICLabel class statistics.

eegprep.eeg_icflag(EEG, thresholds)

Flag independent components based on ICLabel classification probabilities.

eegprep.eeg_picard(EEG[, engine, posact, ...])

Perform ICA decomposition using Picard algorithm.

eegprep.eeg_pv(EEG[, comps, artcomps, ...])

Compatibility alias for eeg_pvaf using legacy positional options.

eegprep.eeg_pvaf(EEG[, comps, artcomps, ...])

Compute percent variance accounted for by ICA component projections.

eegprep.eeg_rpsd(EEG[, nfreqs, pct_data])

Compute relative power spectral density for ICA components.

eegprep.eeg_runica(EEG[, posact, sortcomps])

Perform ICA decomposition using runica (infomax) algorithm.

eegprep.icaact(data, weights[, datamean])

Compute ICA activation waveforms from channel data and weights.

eegprep.icadefs()

Return platform-aware ICA defaults without mutating process globals.

eegprep.icaproj(data, weights, compindex[, ...])

Back-project selected ICA components into channel space.

eegprep.icavar(data, weights[, sphere, compnums])

Return per-frame scalp variance contributed by selected components.

eegprep.iclabel(EEG[, algorithm, engine])

Apply ICLabel to classify independent components.

eegprep.optimal_kmeans(clustdata, clusnum, *)

Run k-means for a range and choose the best silhouette score.

eegprep.picard(*args, **kwargs)

Wrap eeg_picard.

eegprep.posact(data, weights[, sphere])

Flip ICA components whose negative samples have the larger RMS.

eegprep.promax(data[, n_components, ...])

Return oblique Promax and orthogonal Varimax row rotations.

eegprep.robust_kmeans(data, clus_num[, STD, ...])

Cluster rows and iteratively mark distant rows as outliers.

eegprep.spher(data)

Return the sphering (whitening) matrix for the given data.

eegprep.runamica(data[, num_models, ...])

Run AMICA binary on a data matrix.

eegprep.runica(data, *args, **kwargs)

Perform Independent Component Analysis (ICA) decomposition using infomax.

eegprep.runica_ml2(data, **kwargs)

Run the ML2 infomax defaults through the maintained runica engine.

eegprep.runica_mlb(data, **kwargs)

Run the MLB infomax defaults through the maintained runica engine.

eegprep.runicalowmem(data, *args, **kwargs)

Run infomax ICA through EEGPrep's single maintained ICA engine.

eegprep.runpca(data[, n_components, normalize])

Decompose channel-major data into principal components.

eegprep.runpca2(data[, n_components, symmetric])

Whiten channel-major data from its channel covariance matrix.

eegprep.varimax(data[, tolerance, reorder, ...])

Rotate matrix rows toward a sparse, orthogonal simple structure.

eegprep.varsort(activations, weights, sphere)

Return zero-based component order and descending projected power.

eegprep.zica(activations[, frames, ...])

Z-score ICA activations from repeated within-epoch baseline frames.