[Machine Learning] Summary of Regression Algorithm Evaluation Indicators (Latest 2023) Keywords: MAE, MSE, RMSE, R2 (supplement at any time)

Evaluation indicators commonly used in regression algorithms: MAE, MSE and RMSE

1. MAE (Mean Absolute Error: mean absolute error)

Among them, represents the real value and represents the predicted value  

mean_absolute_error = np.sum(np.absolute(y_true - y_predict)) / len(y_true)

 2. MSE (Mean Square Error: Mean Square Error)

The sum of squares of the true value minus the predicted value divided by the predicted sample size makes it independent of the test sample size. 

mean_squared_error = np.sum((y_true-y_predict)**2) / len(y_predict)

3. RMSE (Root Mean Square Error: root mean square error)

RMSE = square root of MSE mean square error 

root_mean_squared_error = sqrt(mean_squared_error)

4. R Squared(R2)

 R-squared, also known as the coefficient of determination, is used to determine how close the data are to the fitted regression line.

 The normal value range of the "coefficient of determination" is [0, 1], the closer to 1, the stronger the explanatory ability of the variables of the equation to y, and the better the model fits the data

r_squared = 1 - mean_squared_error / np.var(y_true)

5. Diagram

6. Summary

source:

Xu Huirong. Optimization and application of fruit sugar detection model based on visible/near-infrared spectroscopy[D]. Zhejiang University, 2010. 

A full summary of classification algorithm evaluation indicators:

(4 messages) [Machine Learning] Summary of classification algorithm evaluation indicators (2023 latest arrangement) Keywords: Accuracy, Precision, Recall, Micro F1, PR, ROC, MCC, Cohen's kappa_daphne odera�'s blog -CSDN blog

reference:

(4 messages) Basic concepts--MAE, MSE and RMSE_mae and mse_Meng Xiaobo's Blog-CSDN Blog

(5 messages) Linear regression algorithm evaluation indicators MSE, RMSE, MAE, R square_The difference between mse and rmse_Dewu Big Frog Blog-CSDN Blog

Guess you like

Origin blog.csdn.net/Next_SummerAgain/article/details/129713321