Class Imbalance Correction Demo Using SMOTE Oversampling
Fraud detection, medical screening, and defect prediction all share an inconvenient property: the events worth catching are rare, so naive models score high accuracy by ignoring them entirely. Handling class imbalance is one of the first hard lessons in applied machine learning, and this project teaches it by demonstration rather than by warning. The intern builds a Streamlit application that trains a scikit-learn classifier on an imbalanced dataset twice — once on the raw data and once after applying SMOTE to synthesize minority-class examples — and presents the two results side by side. The app visualizes the class distribution before and after oversampling and reports precision, recall, and F1 for both runs, making it obvious how a model that looked accurate was actually blind to the minority class, and exactly what resampling recovers. Users can adjust the imbalance ratio and resampling settings to explore edge cases interactively. The intern finishes understanding evaluation beyond accuracy, the mechanics and pitfalls of synthetic oversampling, and how to design a demonstration that makes a subtle statistical issue unmistakable to a general audience — a valuable communication skill in any data role.
Related projects
You might also like