MetricsSummaryDisplay#
- class skore.MetricsSummaryDisplay(data, report_type)[source]#
Display for summarize.
An instance of this class will be created by
Report.metrics.summarize(). This class should not be instantiated directly.- Parameters:
- datapandas.DataFrame
The data to display.
- report_type{āestimatorā, ācomparison-estimatorā, ācross-validationā, ācomparison-cross-validationā}
The type of report.
- frame(*, aggregate=('mean', 'std'), favorability=False, flat_index=False)[source]#
Return the summarize as a dataframe.
- Parameters:
- aggregate{āmeanā, āstdā}, list of such str or None, default=(āmeanā, āstdā)
Only used when
report_typeincludes"cross-validation". Functions to aggregate the scores across the cross-validation splits. None will return the scores for each split.- favorabilitybool, default=False
Whether or not to add an indicator of the favorability of the metric as an extra column in the returned DataFrame.
- flat_indexbool, default=False
Whether to return a flat index or a multi-index.
- Returns:
- framepandas.DataFrame
The report metrics as a dataframe.
- set_style(*, policy='update', **kwargs)[source]#
Set the style parameters for the display.
- Parameters:
- policyLiteral[āoverrideā, āupdateā], default=āupdateā
Policy to use when setting the style parameters. If āoverrideā, existing settings are set to the provided values. If āupdateā, existing settings are not changed; only settings that were previously unset are changed.
- **kwargsdict
Style parameters to set. Each parameter name should correspond to a a style attribute passed to the plot method of the display.
- Returns:
- None
- Raises:
- ValueError
If a style parameter is unknown.
- static style_plot(plot_func)[source]#
Apply consistent style to skore displays.
This decorator: 1. Applies default style settings 2. Executes
plot_func3. Callsplt.tight_layout()to make sure axis does not overlap 4. Restores the original style settings- Parameters:
- plot_funccallable
The plot function to be decorated.
- Returns:
- callable
The decorated plot function.