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_type includes "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.

help()[source]#

Display display help using rich or HTML.

plot()[source]#

Not yet implemented.

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_func 3. Calls plt.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.