ica.ICAReportingMixin#

class autoclean.mixins.viz.ica.ICAReportingMixin[source]#

Mixin providing ICA reporting functionality for EEG data.

This mixin extends the base ReportingMixin with specialized methods for generating visualizations and reports of ICA results. It provides tools for assessing component properties, visualizing component activations, and documenting component rejection decisions.

All reporting methods respect configuration toggles from autoclean_config.yaml, checking if their corresponding step is enabled before execution. Each method can be individually enabled or disabled via configuration.

Available ICA reporting methods include:

  • plot_ica_full: Plot all ICA components over the full time series

  • generate_ica_reports: Create a comprehensive report of ICA decomposition results

  • verify_topography_plot: Use a basicica topograph to verify MEA channel placement.

plot_ica_full()[source]#

Plot ICA components over the full time series with their labels and probabilities.

This method creates a figure showing each ICA component’s time course over the full time series. Components are color-coded by their classification/rejection status, and probability scores are indicated for each component.

Returns:
matplotlib.figure.Figure

The generated figure with ICA components.

Raises:
ValueError

If no ICA object is found in the pipeline.

Examples

>>> # After performing ICA
>>> fig = task.plot_ica_full()
>>> plt.show()
Notes:
  • Components classified as artifacts are highlighted in red

  • Classification probabilities are shown for each component

  • The method respects configuration settings via the ica_full_plot_step config

generate_ica_reports(duration=10)[source]#

Generate comprehensive ICA reports using the _plot_ica_components method.

Parameters:
durationOptional[int]

Duration in seconds for plotting time series data

verify_topography_plot()[source]#

Use ica topograph to verify MEA channel placement. This function simply runs fast ICA then plots the topography. It is used on mouse files to verify channel placement.

compare_vision_iclabel_classifications()[source]#

Compare ICLabel and Vision API classifications for ICA components.

This method creates a comparison report between ICLabel and OpenAI Vision classifications of ICA components, highlighting agreements and disagreements. It requires both classify_ica_components_vision and run_ICLabel to have been run.

Returns:
matplotlib.figure.Figure

Figure showing the comparison of classifications.