Research project
Red Wine Quality Prediction
UCI red-wine quality classification with EDA, IQR cleanup, SMOTE balancing, and a Random Forest at 92.74% test accuracy.
Cover
Overview
Using the UCI red wine quality dataset (1,599 samples, 11 physicochemical features + quality), this notebook reframes sensory quality as a three-class problem — bad (scores 3–4), average (5–6), and good (7–8) — then benchmarks four classifiers after careful cleanup and rebalancing.
Every number below comes from the committed notebook outputs in Red Wine Quality Classification 93 Accuracy.ipynb: Random Forest wins at 92.74% accuracy on a held-out test set of 496 samples.
Evidence
Data & labels
Raw quality scores are skewed: 3→10, 4→53, 5→681, 6→638, 7→199, 8→18. After IQR outlier removal the frame is 974 × 12. Quality is then binned into bad / average / good, which left a severe imbalance (average 826, good 116, bad 32). SMOTE rebalanced to 826 per class (2,478 rows total) before an 80/20 train–test split (1,982 / 496).
Features
Predictors are the standard UCI physicochemical set: fixed acidity, volatile acidity, citric acid, residual sugar, chlorides, free / total sulfur dioxide, density, pH, sulphates, and alcohol. The original quality column is dropped once new_quality is encoded.
Model results
From the notebook
Random Forest led with 0.9274 accuracy and balanced precision/recall across classes (e.g. class 1 recall 0.99, class 2 recall 0.96). Confusion matrices and classification reports are saved in the notebook cells alongside the accuracy prints — evidence for the “93%” title on the file.
Highlights
- Started from 1,599 UCI samples; IQR filtering reduced the working set to 974 rows
- Collapsed scores into bad / average / good, then SMOTE-balanced to 826 per class
- Trained Random Forest, SVM, KNN, and Decision Tree on an 80/20 split (1,982 / 496)
- Random Forest reached 92.74% test accuracy with ~0.93 macro precision/recall/F1
- Documented EDA, outlier plots, class counts, and confusion matrices in the published notebook
Technologies used
Core tools and libraries behind this project — click a logo for official docs.




