Why Doesn’t My Model Work?
The Gradient 2 years ago
Machine learning models often fail in real-world deployment due to data quality issues, data leakage, and inappropriate evaluation metrics, despite appearing successful during development. Examples include Covid prediction models achieving high test accuracy through hidden variables like patient positioning rather than actual disease features, and pre-term birth models showing near-perfect accuracy that dropped to random performance when data augmentation leakage was corrected. Practitioners can prevent these failures by scrutinizing data for spurious correlations, properly isolating test data before preprocessing, avoiding iterative test set reuse for model development, and selecting appropriate evaluation metrics for the problem at hand.