Table of Contents
ToggleBuilding a model is only half the work — you must also evaluate its accuracy and reliability. In this lesson, we’ll cover the most used evaluation metrics in regression.
Average of absolute differences between predicted and actual values. Lower MAE = better model.
from sklearn.metrics import mean_absolute_error
Measures average squared error. RMSE is square root of MSE. Sensitive to large errors.
from sklearn.metrics import mean_squared_error
Indicates how well data fits the model. R² = 1 means perfect fit, R² = 0 means poor fit.
from sklearn.metrics import r2_score
⏭️ Next: Mini Project – Predict Housing Prices or Salary
