mne_denoise.viz.plot_component_score_curve#

mne_denoise.viz.plot_component_score_curve(estimator, mode='raw', ax=None, show=True, fname=None)[source]#

Plot a 1D component score curve for a fitted estimator.

Parameters:
  • estimator (object) – Fitted estimator exposing eigenvalues_ or scores_.

  • mode ({'raw', 'cumulative', 'ratio'}) –

    Score display mode:

    • 'raw': raw score/eigenvalue per component.

    • 'cumulative': normalized cumulative sum.

    • 'ratio': same values as 'raw' but labeled as a ratio view.

  • ax (matplotlib.axes.Axes | None) – Target axes. If None, a new themed figure is created.

  • show (bool, default=True) – If True, show the figure.

  • fname (path-like | None) – Optional output path used to save the figure.

Returns:

fig – Figure handle.

Return type:

matplotlib.figure.Figure

Raises:

ValueError – If mode is invalid, or if scores are missing/invalid.

Notes

When available, the function overlays a dashed vertical cutoff using n_selected_ or n_removed_ from the estimator.

Examples

>>> from mne_denoise.viz import plot_component_score_curve
>>> fig = plot_component_score_curve(estimator, mode="raw", show=False)