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 RegressionQuality Preset

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

Overview

Concrete preset container for computing regression quality metrics provided by the Evidently library.

Description

RegressionQuality is a MetricContainer that expands into individual regression metrics (MeanError, MAPE, RMSE, MAE, R2Score, AbsMaxError) plus optional visualizations (predicted vs actual, error plot, error distribution).

Usage

Include in a Report metrics list when evaluating regression model performance.

Code Reference

Source Location

  • Repository: evidently
  • File: src/evidently/presets/regression.py
  • Lines: L36-90

Signature

class RegressionQuality(MetricContainer):
    def __init__(
        self,
        pred_actual_plot: bool = False,
        error_plot: bool = False,
        error_distr: bool = False,
        mean_error_tests: MeanStdMetricsPossibleTests = None,
        mape_tests: MeanStdMetricsPossibleTests = None,
        rmse_tests: GenericSingleValueMetricTests = None,
        mae_tests: MeanStdMetricsPossibleTests = None,
        r2score_tests: GenericSingleValueMetricTests = None,
        abs_max_error_tests: GenericSingleValueMetricTests = None,
        include_tests: bool = True,
        regression_name: str = "default",
    ):

Import

from evidently.presets import RegressionQuality

I/O Contract

Inputs

Name Type Required Description
regression_name str No Task name matching DataDefinition (default: "default")
pred_actual_plot bool No Show predicted vs actual plot
error_plot bool No Show error plot
error_distr bool No Show error distribution
include_tests bool No Enable auto-tests (default: True)

Outputs (Expanded Metrics)

Metric Type Description
MeanError float Average prediction error (mean and std)
MAPE float Mean absolute percentage error
RMSE float Root mean squared error
MAE float Mean absolute error
R2Score float Coefficient of determination
AbsMaxError float Absolute maximum error

Usage Examples

from evidently import Report, Dataset, DataDefinition
from evidently.core.datasets import Regression
from evidently.presets import RegressionQuality

data_def = DataDefinition(
    regression=[Regression(target="price", prediction="predicted_price")]
)

report = Report([RegressionQuality(pred_actual_plot=True)], include_tests=True)
snapshot = report.run(
    Dataset.from_pandas(df_current, data_def),
    Dataset.from_pandas(df_reference, data_def),
)
snapshot.save_html("regression_report.html")

Related Pages

Implements Principle

Page Connections

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