The Fairness Metrics Your ML Model Needs -And Why Accuracy Isn't One of Them
Your fraud detection model hits 99.8% accuracy. Ship it? Not so fast. That number means your model predicts "not fraud" for every single transaction — and it's right 99.8% of the time because only ...

Source: DEV Community
Your fraud detection model hits 99.8% accuracy. Ship it? Not so fast. That number means your model predicts "not fraud" for every single transaction — and it's right 99.8% of the time because only 0.2% of transactions are actually fraudulent. It catches exactly zero fraud cases. Accuracy told you everything was fine. It was lying. This is the class imbalance trap, and it's the most common evaluation mistake I see teams make when deploying ML models into production. But it's just the beginning. Even when you move past accuracy to better metrics, there's a harder question most teams never ask: is my model fair? The Four Metrics You Actually Need Before we talk about fairness, let's fix the basics. For any classification problem — fraud detection, loan approval, medical screening, content moderation — you need to understand four numbers from the confusion matrix: True Positives (TP): Model said yes, answer was yes. True Negatives (TN): Model said no, answer was no. False Positives (FP): M