Evaluation metrics
In this section, we will take a look at a few metrics that will allow us to mathematically quantify the performance of our classifiers, regressors, and filters.
Accuracy
Accuracy is the most widely used metric to gauge the performance of a classification model. It is the ratio of the number of correct predictions to the total number of predictions made by the model:

Root mean square error
The Root Mean Square Error (or RMSE) is a metric widely used to gauge the performance of regressors. Mathematically, it is represented as follows:

Here,

is the ith real target value and

is the ith predicted target value.
Binary classification metrics
Sometimes, accuracy does not give us a good estimate of the performance of a model.
For instance, consider a binary class dataset where 99% of the data belongs to one class and only 1% of the data belongs to the other...