July 2019
Beginner to intermediate
740 pages
16h 52m
English
When we have a class imbalance, accuracy can become an unreliable metric for measuring our performance. For instance, if we had a 99/1 split between two classes, A and B, where the rare event, B, is our positive class, we could build a model that was 99% accurate by just saying everything belonged to class A. Clearly, we shouldn't bother building a model if it doesn't do anything to identify class B; thus, we need different metrics that will discourage this behavior. For this, we use precision and recall instead of accuracy. Precision tells us about the ratio of true positives to everything flagged positive:

Recall gives ...
Read now
Unlock full access