Search⌘ K

Model Evaluation Measures (Median Absolute Error, R^2 Score)

Explore how to evaluate regression models using Median Absolute Error, a robust error measure against outliers, and the R squared score, which shows how well the model explains data variance. Understand when to use these metrics and how they help compare model performance effectively.

Median absolute error

Median is a Descriptive Statistics Measure and is robust to outliers in the dataset. The rate of error is calculated by taking the median of all absolute differences between the target and the prediction. Lower values means the model is more accurate.

Formula

If y^\hat{y} is the predicted target real valued output, then yy is the corresponding target real valued output and mm is the total number of instances. Then the median absolute error is calculated as follows:

MedAE(y^,y)=median(y^1y1,...,y^mym)MedAE(\hat{y}, y) = median(|\hat{y}^1 - y^1|,...,|\hat{y}^m - y^m|) ...