Menu

Understanding Mean Absolute Error (MAE)

Understanding Mean Absolute Error (MAE)

While R² measures explanatory power, Mean Absolute Error measures prediction error directly.

MAE calculates the average absolute difference between actual and predicted values.

Formula

MAE = Average Absolute Error

Code

**mae = metrics.mean_absolute_error(**

**y_train,**

**y_train_pred**

**)**

**print(mae)**

Output

0.1933648700612105

Interpretation

The average prediction error is approximately 1.14 thousand dollars.

Lower MAE values indicate better predictive performance.

A value close to zero means the predictions are very close to the actual house prices.