Your logistic regression model reports 99% accuracy .
Your team celebrates.
Then the fraud department tells you it caught almost none of the fraudulent transactions.
What happened?
Nothing is necessarily wrong with the logistic regression algorithm. The problem is probably how you're evaluating it .
Binary classification models don't just need a model score. They need the - right evaluation strategy - one that reflects what happens when the model makes a wrong prediction.
In this article, we'll walk through the core classification metrics you should know when evaluating a binary logistic regression model:
Accuracy
Precision
Recall
False positives and false negatives
Threshold selection
ROC curves
ROC-AUC
We'll also use scikit-learn to calculate everything with real Python code.
First: Logistic Regression Doesn't Actually Predict "Yes" or "No"
Despite its name, logistic regression produces a probability .
For example, imagine we're predicting whether a credit-card transaction is…