Measuring a model's performance is an important machine learning task, and there are many varied parameters and heuristics for doing this. The importance of defining a scoring strategy should not be underestimated, and in Sklearn, there are basically three approaches:
We have seen examples of the estimator score()
method, for example, clf.score()
. In the case of a linear classifier, the score()
method returns the mean accuracy. It is a quick and easy way to gauge an individual estimator's performance. However, this method is usually insufficient in itself for a number of reasons.
If we remember, accuracy is the sum of the true positive and true negative cases divided by the number of samples. Using this...