Sure! For regression problems, some common metrics to evaluate model performance include:
- Mean Absolute Error (MAE): This is the average of the absolute differences between the predicted and actual values. It measures the average magnitude of the errors, regardless of their direction.
MAE = (1/n) * Σ|y_i - ŷ_i|
where n is the number of data points, y_i is the actual value, and ŷ_i is the predicted value.
- Mean Squared Error (MSE): This is the average of the squared differences between the predicted and actual values. It measures the average squared magnitude of the errors. MSE is more sensitive to large errors than MAE because it squares the errors.
MSE = (1/n) * Σ(y_i - ŷ_i)^2
where n is the number of data points, y_i is the actual value, and ŷ_i is the predicted value.
- Root Mean Squared Error (RMSE): This is the square root of the mean squared error. It measures the average magnitude of the errors in the units of the dependent variable. RMSE is more interpretable than MSE because it's in the same units as the dependent variable.
RMSE = sqrt[(1/n) * Σ(y_i - ŷ_i)^2]
where n is the number of data points, y_i is the actual value, and ŷ_i is the predicted value.
- R-squared (R2): This is a measure of the proportion of the variance in the dependent variable that can be explained by the independent variables. R2 ranges from 0 to 1, where 0 indicates no relationship between the variables and 1 indicates a perfect fit. However, a high R2 value does not necessarily mean that the model is good, as it can still be overfitting to the data.
R2 = 1 - (SSR/SST)
where SSR is the sum of squared residuals (i.e., the sum of squared differences between the predicted and actual values), and SST is the total sum of squares (i.e., the sum of squared differences between the actual values and the mean of the actual values).
- Adjusted R-squared: This is a modified version of R2 that penalizes the addition of unnecessary variables to the model. It adjusts the R2 value based on the number of independent variables in the model and the number of data points. Adjusted R2 is useful for comparing models with different numbers of independent variables.
Adjusted R2 = 1 - [(1-R2)*(n-1)/(n-k-1)]
where n is the number of data points, k is the number of independent variables, and R2 is the R-squared value.
- Mean Absolute Percentage Error (MAPE): This is the average of the absolute percentage differences between the predicted and actual values. It measures the average percentage error, regardless of direction.
MAPE = (1/n) * Σ|(y_i - ŷ_i)/y_i|*100%
where n is the number of data points, y_i is the actual value, and ŷ_i is the predicted value.