Root mean square error

Another approach of solving the problem of inconsistent signs of error is to square the error (the square of a negative number is a positive number). The scenario discussed previously can be translated as follows:

Actual value

Predicted value

Error

Squared error

Data point 1

100

120

20

400

Data point 2

100

80

-20

400

Overall

200

200

0

800

In this case, the overall squared error is 800 and root mean squared error is the square root of (800/2), which is 20.

The accuracy in the case of a classification exercise is measured as follows: absolute error and RMSE are applicable when predicting continuous variables. However, predicting an event with discrete outcomes is ...

Get Hands-On Machine Learning on Google Cloud Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.