2.7. Measuring Error#
When calculating the error of a classification model we just care whether the prediction was correct or not correct. In this case, we use accuracy, i.e. the percentage of correct predictions.
Let’s consider the following study example.
Time Spent Studying (hours) |
Predicted Exam (Fail 0/Pass 1) |
Actual Exam (Fail 0/Pass 1) |
|---|---|---|
2.5 |
0 |
0 |
3.2 |
1 |
0 |
7 |
1 |
1 |
Here you can see that 2 of the predictions match the actual exam results. This means the model’s accuracy is \(\cfrac{2}{3} = 66.7%\).