Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Evidentlyai Evidently Legacy Regression Preset

From Leeroopedia
Knowledge Sources
Domains ML Monitoring, Regression Analysis
Last Updated 2026-02-14 12:00 GMT

Overview

RegressionPreset is a metric preset class that bundles a comprehensive set of regression performance metrics for one-shot analysis of regression model quality.

Description

The RegressionPreset class extends MetricPreset and provides a convenient way to generate a collection of nine regression-related metrics in a single call. When invoked, it produces:

  • RegressionQualityMetric -- overall regression quality statistics (MAE, RMSE, MAPE, etc.)
  • RegressionPredictedVsActualScatter -- scatter plot of predicted vs actual values
  • RegressionPredictedVsActualPlot -- line plot of predicted vs actual values
  • RegressionErrorPlot -- error distribution over time or index
  • RegressionAbsPercentageErrorPlot -- absolute percentage error plot
  • RegressionErrorDistribution -- histogram of regression errors
  • RegressionErrorNormality -- normality test for regression errors
  • RegressionTopErrorMetric -- analysis of the top errors
  • RegressionErrorBiasTable -- error bias table broken down by specified columns

The preset accepts an optional columns parameter that is passed to RegressionErrorBiasTable to control which columns are used for bias analysis.

The class is registered with the type alias "evidently:metric_preset:RegressionPreset".

Usage

Use this preset when you need a full regression performance report without manually assembling individual metrics. It is suitable for model monitoring dashboards and one-off regression analysis reports in the Evidently legacy API.

Code Reference

Source Location

Signature

class RegressionPreset(MetricPreset):
    class Config:
        type_alias = "evidently:metric_preset:RegressionPreset"

    columns: Optional[List[str]]

    def __init__(self, columns: Optional[List[str]] = None):
        ...

    def generate_metrics(
        self, data_definition: DataDefinition, additional_data: Optional[Dict[str, Any]]
    ) -> List[AnyMetric]:
        ...

Import

from evidently.legacy.metric_preset.regression_performance import RegressionPreset

I/O Contract

Inputs

Name Type Required Description
columns Optional[List[str]] No List of column names to pass to RegressionErrorBiasTable for bias analysis. Defaults to None.

Outputs

Name Type Description
return List[AnyMetric] A list of nine regression metric instances: RegressionQualityMetric, RegressionPredictedVsActualScatter, RegressionPredictedVsActualPlot, RegressionErrorPlot, RegressionAbsPercentageErrorPlot, RegressionErrorDistribution, RegressionErrorNormality, RegressionTopErrorMetric, and RegressionErrorBiasTable.

Usage Examples

from evidently.legacy.metric_preset.regression_performance import RegressionPreset
from evidently.legacy.report import Report

# Create a regression performance report with default settings
report = Report(metrics=[RegressionPreset()])
report.run(reference_data=ref_df, current_data=curr_df)

# Create a regression performance report with specific columns for bias analysis
report = Report(metrics=[RegressionPreset(columns=["feature_1", "feature_2"])])
report.run(reference_data=ref_df, current_data=curr_df)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment