eegprep.eeg_icalabelstat#

eegprep.eeg_icalabelstat(EEG, threshold=0.9, *, verbose=True, stream=None)#

Return and optionally print ICLabel class statistics.

This mirrors EEGLAB’s plugins/ICLabel/eeg_icalabelstat.m summary, including class order and the historical IClabel console label, while returning structured Python statistics for programmatic use.

Parameters:
  • EEG (dict[str, Any]) – EEGPrep/EEGLAB-style dataset with ICLabel classifications under EEG["etc"]["ic_classification"]["ICLabel"].

  • threshold (float | list[float] | tuple[float, ...] | ndarray) – Scalar probability threshold applied to every class, or one threshold per ICLabel class.

  • verbose (bool) – Print EEGLAB-style summary lines when true.

  • stream (TextIO | None) – Destination for printed summary lines. Defaults to stdout.

Returns:

Dictionary containing class names, thresholds, per-class counts, 1-based component indices above threshold, mean probabilities, dominant class counts, and current rejected/kept tallies.

Return type:

dict[str, Any]