mantispy.pp.decorr_threshold_sweep

mantispy.pp.decorr_threshold_sweep#

mantispy.pp.decorr_threshold_sweep(adata, thresholds, scorers, *, key='selected', **feature_select_kwargs)[source]#

Score decorrelate at a range of thresholds so the smallest set that holds a metric can be chosen.

decorr_threshold trades size for signal, and the right setting depends on the screen and on the metric that matters, so there is no universal best. This runs feature_select() with decorrelate=True at each threshold on a copy, scores the selected object with each callable, and returns one row per threshold.

Parameters:
Return type:

DataFrame

Returns:

A frame with a threshold column, an n_kept column, and one column per scorer.