Wine Quality Prediction Using Adaptive Robust Outlier Filtering and Residual Multilayer Perceptron
Wine quality strongly influences consumer acceptance, pricing, and certification, and it is closely linked to measurable physicochemical properties such as acidity,...
About This Product
Wine Quality Prediction Using Adaptive Robust Outlier Filtering and Residual Multilayer Perceptron
1. Introduction
Wine quality strongly influences consumer acceptance, pricing, and certification, and it is closely linked to measurable physicochemical properties such as acidity, residual sugar, sulfur dioxide, density, pH, sulphates, and alcohol content .Conventional quality assessment relies on trained human tasters who score each wine by sensory evaluation. This process is time-consuming and expensive, and it is subjective, so scores can vary between evaluators and tasting sessions.Machine learning offers a way to estimate quality directly from routine laboratory measurements. However, wine data are rarely ideal: several features contain extreme values (for example residual sugar, chlorides, and sulfur dioxide), distributions are skewed, the features lie on very different scales, and the quality scores are concentrated around the middle values, all of which reduce the reliability of predictive models.To address these challenges, this work combines Adaptive Robust Outlier Filtering (AROF) for data conditioning with a Residual Multilayer Perceptron (ResMLP) for prediction. AROF derives lower and upper bounds for each feature from robust statistics of the training data and clips values that fall outside them, so that extreme measurements are limited without discarding any sample. The conditioned features are then scaled with a RobustScaler, which uses the median and interquartile range and therefore remains stable in the presence of outliers.The ResMLP then predicts the quality score of each wine from its 11 physicochemical inputs. Residual blocks add skip connections around the dense layers , which improves gradient flow and makes training of a deeper network on a compact tabular dataset more stable.The model is formulated as a regression problem. It produces a continuous score that is rounded and limited to the dataset range of 3 to 8, and the score is then grouped into two quality categories: Average (3 to 5) and Good (6 to 8).
The methodology covers data inspection and visualization, cleaning, AROF clipping, stratified train, validation, and test splitting, robust feature scaling, ResMLP training, and evaluation. The trained model, scaler, and preprocessing bounds are then integrated into a Django web application that lets users register, log in, enter the 11 physicochemical attributes, and receive a predicted quality score with its category.The proposed approach aims to support faster, more consistent, and lower-cost wine quality screening and to reduce reliance on manual sensory evaluation alone.
2. Problem Statement
Manual assessment of wine quality presents several challenges in practice:
•Subjective Assessment: Sensory scoring depends on the experience and preferences of individual tasters and can lead to inconsistent ratings for the same wine.
•Outliers & Skewed Measurements: Physicochemical records contain extreme values and skewed distributions that distort model training when they are left untreated.
•Imbalanced Quality Scores: Most wines receive middle scores, while very low and very high scores are rare, which makes the extremes difficult for a model to learn.
•Cost & Limited Access: Expert tasting panels are costly and time-consuming, which limits routine quality checks, particularly for small producers.
There is a clear need for an automated, outlier-resilient, and accessible system that can process routine laboratory measurements and estimate wine quality quickly and consistently.
3. Input & Dataset Specifications
•Dataset Volume: The Wine Quality dataset used here contains 1,599 red wine samples, each described by 11 physicochemical measurements and a sensory quality score.
•Input Features: 11 numerical physicochemical attributes per wine: fixed acidity, volatile acidity, citric acid, residual sugar, chlorides, free sulfur dioxide, total sulfur dioxide, density, pH, sulphates, and alcohol.
•Target Variable: Integer quality score in the range 3 to 8. The model predicts a continuous value that is rounded and limited to this range, then grouped into Average (3 to 5) and Good (6 to 8).
•Data Quality Handling: The dataset contains no missing entries. Outliers are controlled by AROF, which clips each feature to bounds learned from the training data, and the features are then standardized with a saved RobustScaler.
•User Input Mechanism: Interactive submission of the 11 attributes through a form on the Django web application, with each field validated as a non-negative number.
4. Expected System Output
The system is engineered to provide clear, actionable output upon processing a submitted set of wine measurements:
•Predicted Quality Score: Rounded integer score between 3 and 8, displayed on a gauge out of 8.
•Quality Category: Automated grouping of the score as Average (3 to 5) or Good (6 to 8).
•Raw Model Output: The continuous value produced by the network before rounding (for example 4.6632), shown alongside the final score.
•Result Dashboard: A result page that presents the predicted score on a 3 to 8 scale, the category badge, a short description, and a brief tip on which properties may influence quality.
5. Novelty
•Adaptive Robust Outlier Filtering (AROF): A feature-wise outlier control step in which clipping bounds are derived from the distribution of each feature using robust statistics, so that extreme values are limited rather than removed and no training sample is lost.
•Residual MLP for Tabular Regression: Residual blocks with skip connections that improve gradient flow and training stability when learning wine quality from compact physicochemical data.
•Consistent Training and Inference Pipeline: The same clipping bounds and RobustScaler fitted during training are saved and applied to every user submission, so live predictions are processed exactly as the training data were.
•End-to-End Application Deployment: Integration of the preprocessing pipeline, trained model, and a full-stack Django web interface with authentication and live prediction.
6. Research Contribution
The proposed work establishes a complete, modular end-to-end framework encompassing the following key milestones:
•Preprocessing Pipeline: Design and implementation of data cleaning, AROF clipping, and robust feature scaling routines.
•Model Development: Training of the ResMLP with stratified splitting and robust feature scaling, with training curves monitored for convergence.
•Quality Prediction: Estimation of a wine quality score from 11 routine physicochemical measurements, with a two-level grouping into Average and Good.
•Comprehensive Metrics: Evaluation using mean absolute error, mean squared error, root mean squared error, and the R² score, supported by actual-versus-predicted and residual analysis. On the held-out test set, the model achieved .
•Evaluation & Deployment: Systematic performance evaluation followed by web-based deployment for live inference.
•User-Centric Web Application: A Django interface providing registration, secure login, a structured input form with validation, and live prediction feedback.
7. Conclusion
The proposed system combines Adaptive Robust Outlier Filtering with a Residual Multilayer Perceptron to estimate wine quality from routine physicochemical measurements.The AROF stage is designed to improve robustness against extreme and skewed measurements without discarding samples, while the residual blocks allow the network to train stably on a compact tabular dataset.Integration with a Django-based web application makes the model directly accessible to users for immediate data entry and prediction, supporting faster and more consistent quality screening.Because the dataset is of limited size and the system is a research prototype, the reported performance should be confirmed through further validation, such as cross-validation and testing on independent wine samples, including white wines, before any claim of general applicability. The system is intended as a decision-support aid and not as a replacement for professional sensory evaluation.
8. References
[1] P. Cortez, A. Cerdeira, F. Almeida, T. Matos, and J. Reis, “Modeling wine preferences by data mining from physicochemical properties,” Decision Support Systems, vol. 47, no. 4, pp. 547–553, 2009.
[2] P. Cortez, A. Cerdeira, F.
Almeida, T. Matos, and J. Reis, “Wine Quality,” UCI Machine Learning
Repository, 2009. [Online]. Available: https://doi.org/10.24432/C56S3T
[3] K. He, X. Zhang, S. Ren, and J. Sun, “Deep Residual Learning for Image Recognition,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 770–778.
[4] F. Pedregosa et al., “Scikit-learn: Machine Learning in Python,” Journal of Machine Learning Research, vol. 12, pp. 2825–2830, 2011.
[5] J. W. Tukey, Exploratory Data Analysis. Reading, MA, USA: Addison-Wesley, 1977.
[6] P. J. Huber, Robust Statistics. New York, NY, USA: Wiley, 1981.
PYTHON
DJANGO
HTML
CSS
No reviews available for this product.
Add Your Review
You May Also Like
View All
Emotion Classification from Text using BiLSTM Deep Learning Model
$199
$398 50% OFF