Skip to main content

MedianAbsoluteError

Metric
DashAI.back.metrics.regression.MedianAbsoluteError

Median of absolute differences between predicted and true values.

Median Absolute Error (MedAE) is a robust regression metric that uses the median rather than the mean of the absolute residuals. Because the median is insensitive to extreme values, MedAE is far less affected by outliers than MAE, MSE, or RMSE, making it the preferred metric when the target distribution has heavy tails or occasional extreme measurements.

::

MedAE(y, ŷ) = median( |y₁ - ŷ₁|, …, |yₙ - ŷₙ| )

Range: [0, +∞), lower is better (MAXIMIZE = False).

References

Methods

score(true_values: 'DashAIDataset', predicted_values: 'np.ndarray') -> float

Defined on MedianAbsoluteError

Calculate the Median Absolute Error between true values and predicted values.

Parameters

true_values : DashAIDataset
A DashAI dataset with true values.
predicted_values : np.ndarray
A one-dimensional array with the predicted values for each instance.

Returns

float
Median Absolute Error score between true values and predicted values

get_metadata(cls: 'BaseMetric') -> Dict[str, Any]

Defined on BaseMetric

Get metadata values for the current metric.

Returns

Dict[str, Any]
Dictionary with the metadata

Compatible with