mne_denoise.dss.selection.detect_eigenvalue_knee#

mne_denoise.dss.selection.detect_eigenvalue_knee(scores: ndarray, rel_floor: float = 0.01, min_ratio: float = 3.0) int[source]#

Select components above the largest qualifying score drop.

Parameters:
scoresarray-like

Component scores in descending order.

rel_floorfloat, default=0.01

Relative floor for valid drop anchors.

min_ratiofloat, default=3.0

Minimum adjacent-score ratio.

Returns:
int

Number of scores above the knee, or zero if no qualifying knee exists.

Notes

The drop is evaluated in log space with the relative-floor and minimum-ratio gates. This is a package heuristic.