summarize_selection#

scikitplot.decile.summarize_selection(plot_input, *, ntile=10)[source]#

Return a standardized summary row per group at a selected ntile.

Parameters:
plot_inputpandas.DataFrame

Output of ModelPlotPy.plotting_scope.

ntileint

Ntile to summarize (must exist in plot_input).

Returns:
pandas.DataFrame

One row per group with standardized fields.

Columns include:

  • model_label, dataset_label, target_class

  • ntile

  • tot, pos, pct

  • cumtot, cumpos, cumpct

  • cumlift, cumgain

Raises:
_PlotInputError

If required columns are missing.

ValueError

If ntile is outside valid range.

Parameters:
Return type:

DataFrame

Notes

This helper is intended for DS/MLOps workflows where you want a stable, audit-friendly view of a chosen operating point (e.g., decile 3).

Examples

>>> # df = summarize_selection(plot_input, ntile=3)