Skip to content Skip to sidebar Skip to footer

Evaluating Models With Root Mean Square Error (RMSE) and MAE

Assalamualaikum, Greetings of Prosperity and Greetings of Culture

The evaluation method of a machine learning model is important to do because it aims to measure the accuracy and accuracy of the methods that have been used. For this reason, at this stage one of the methods that needs to be done is to determine the value of the Root Mean Square Error and Mean Square error

However, it is necessary to note that in machine learning there are two different types, namely Classification and Regression.

Classification is a learning method that predicts a class, for example, whether the class is negative or positive. In a classification problem an algorithmic model tries to predict a class using data during the training phase. In this case it is also called training data.

To test or evaluate the performance of the classification algorithm is to use a testing method with confusion matrix. There are two types, namely binary classification and multi-class classification.

Also Read: How to calculate multi-class confusion matrix.

Regression is a machine learning method that predicts values ​​such as distance, price and age. In regression there is no predicted class but there is a scale and the algorithm model tries to predict the value on that scale.

Meanwhile, for testing of this regression model is to use the value of the Root Mean Square Error and Mean Square Error.

Root Mean Square Error (RMSE)

Root Mean Square Error (RMSE) is the sum of the squared error or the difference between the true value and the predicted value. The RMSE formula is

Rumus RMSE

Y '= Predicted Value 
Y = True Value
n = Total Data

Example of Settlement

Tabel Prediksi

In the table above, you can see that there are two different colors between green and yellow. It shows the true value and the predicted value.

Now, to avoid confusion, we will try to calculate separately
First, you first calculate the square of each value. For example, the first value is (Y'-Y) ^ 2
  • (1879.8 - 1,866.30)^2 = 182.25 
Second, you sum up all the results of the fading process. Then in table form it will look like the one below


Then the results will be divided into the number of test data and rooted.
  • =SQRT(7925.8425 / 5 ) 
Then the resulting RMSE value is 39.8142 

Mean Square Error (MSE)

In contrast to RMSE, the MSE Square Error (MSE) is a method for evaluating forecasting by means of the error squared without a rooting process. if the error is large, the greater MSE is generated.
Y '= Predicted Value 
Y = True Value
n = Total Data
  • =(7925.8425 / 5 ) = 1585.1685

Mean Absolute Error (MAE)

MAE shows the average error value (error) of the true value with the forecast value. MAE formula is defined as follows :

Rumus MAE
Y '= Predicted Value 
Y = True Value
n = Total Data

Then in table form it will look like the one below

Mean Absolute Error

Conclusion

So, from the three evaluations, it can be seen that the MAE value is smaller than the RMSE. In the regression model, to determine the accuracy of the model performance of an algorithm, we can take it from a value that has a small error. In other words, the smaller the error value generated, the closer the value or distance between the actual value and the predicted value,

Thank you so much, I hope you can find what you are looking for. "Don't forget to breathe and stay grateful"

See You Later.



Abdul Muiz Khalimi
Abdul Muiz Khalimi Tertulis sebuah kata yang ditulis oleh Penulis.