Metrics for classification model evaluation

A classification accuracy is defined as follows:
image (5.9)
Although accuracy provides a general understanding of the model's accuracy in terms of predicting the correct classes, one major problem with using accuracy when evaluating a classification model is when there is unbalanced class distribution within a data set. For example, if in a data set with 1 MM rows, 100K rows are assigned to class 0 and the remaining 900K rows are assigned to class 1, this is classified as an unbalanced distribution. Therefore, confusion matrix is recommended to obtain more information in terms of evaluating a model's accuracy. ...

Get Machine Learning Guide for Oil and Gas Using Python 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.