The notebook title says 93% accuracy. The interesting part is how we got there without lying to ourselves about the data. UCI red wine quality is tiny, skewed, and full of outliers — a perfect teaching set for messy classification.
The raw score distribution is the plot twist
Quality scores from 3 to 8 are not evenly filled. Most bottles sit in the middle. Collapsing into bad / average / good made the task clearer, but it also exposed the imbalance: after IQR cleanup I still had 826 average, 116 good, and only 32 bad.
SMOTE is a tool, not a magic wand
SMOTE rebalanced to 826 per class before the train–test split. That helped models see the minority class, but it also means accuracy is measured on a synthetic-aware pipeline. I still report the notebook numbers honestly — Random Forest at 92.74% on 496 test samples — and I treat them as evidence of the workflow, not a claim about production wine scoring.
Why Random Forest beat SVM here
On this feature space, ensembles handled mixed physicochemical signals better than a margin-based SVM (64.52%). Decision Tree and KNN landed in between. The classification reports mattered more than the headline accuracy: recall on the rare “bad” band was where models showed their real character.
What I take forward
Always plot the label distribution before celebrating a metric. Clean outliers deliberately. And keep the notebook outputs in the repo — future-you will thank past-you for the receipts.
