pdstools.adm.Plots._score¶
Score-distribution plots for the classifier.
Classes¶
Common attribute surface used by every plot mixin. |
Module Contents¶
- class _ScorePlotsMixin¶
Bases:
pdstools.adm.Plots._base._PlotsBaseCommon attribute surface used by every plot mixin.
- score_distribution(model_id: str, *, active_range: bool = True, return_df: bool = False)¶
Generate a score distribution plot for a specific model.
- Parameters:
- Returns:
Plotly figure showing score distribution or DataFrame if return_df=True
- Return type:
Union[Figure, pl.LazyFrame]
- Raises:
ValueError – If no data is available for the provided model ID
Examples
>>> # Score distribution for a specific model (active range only) >>> fig = dm.plot.score_distribution(model_id="M-1001")
>>> # Include the full score range rather than just the active range >>> fig = dm.plot.score_distribution(model_id="M-1001", active_range=False)
>>> # Retrieve the underlying binning data >>> df = dm.plot.score_distribution(model_id="M-1001", return_df=True)
- multiple_score_distributions(query: pdstools.utils.types.QUERY | None = None, show_all: bool = True) list[pdstools.utils.plot_utils.Figure]¶
Generate the score distribution plot for all models in the query
- Parameters:
- Returns:
A list of Plotly charts, one for each model instance
- Return type:
list[go.Figure]
Examples
>>> # Generate and display score distributions for all models >>> figs = dm.plot.multiple_score_distributions()
>>> # Collect figures without displaying them >>> figs = dm.plot.multiple_score_distributions(show_all=False)
>>> # Limit to a specific channel before generating all distributions >>> figs = dm.plot.multiple_score_distributions( ... query={"Channel": "Web"}, ... show_all=False, ... )