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

In this lesson we will look at different evaluation measures for Regression Models.

## We'll cover the following

## 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 $\hat{y}$ is the predicted target real valued output, then $y$ is the corresponding target real valued output and $m$ is the total number of instances. Then the median absolute error is calculated as follows:

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

### Code

These code examples have been taken from the Scikit Learn Documentation.

Get hands-on with 1200+ tech skills courses.