Professional Documents
Culture Documents
White Wine
Bad quality 0.89 0.72 0.80
Good quality 0.43 0.70 0.54
Accuracy 0.72
The above Figure 1 shows the confusion matrix of Naïve Bayes for red wine and white wine. The model has
been evaluated on the basis of precision, recall, and f1-score. Table 1 shows the accuracy of Naïve Bayes on the
basis of above-mentioned parameters.
Figure 2: Confusion Matrix of Stochastic Gradient Descent a) Red Wine b) White Wine
Table 2: Accuracy of Stochastic Gradient Descent
Red Wine Precision Recall F1-Score
Bad quality 0.87 0.96 0.91
Good quality 0.37 0.15 0.21
Accuracy 0.84
White Wine
Bad quality 0.80 0.97 0.87
Good quality 0.63 0.18 0.28
Accuracy 0.78
The above Figure 2 shows the confusion matrix of Stochastic Gradient Descent for red wine and white wine.
The model has been evaluated on the basis of precision, recall, and f1-score. Table 2 shows the accuracy of
Stochastic Gradient Descent on the basis of above-mentioned parameters.
Figure 5: Confusion Matrix of Support Vector Machine a) Red Wine b) White Wine
www.irjmets.com @International Research Journal of Modernization in Engineering, Technology and Science
[157]
e-ISSN: 2582-5208
International Research Journal of Modernization in Engineering Technology and Science
( Peer-Reviewed, Open Access, Fully Refereed International Journal )
Volume:03/Issue:09/September-2021 Impact Factor- 6.752 www.irjmets.com
Table 5: Accuracy of Support Vector Machine
Red Wine Precision Recall F1-Score
Bad quality 0.88 0.98 0.93
Good quality 0.71 0.26 0.37
Accuracy 0.88
White Wine
Bad quality 0.83 0.97 0.89
Good quality 0.75 0.34 0.47
Accuracy 0.82
The above Figure 5 shows the confusion matrix of Stochastic Gradient Descent for red wine and white wine.
The model has been evaluated on the basis of precision, recall, and f1-score. Table 5 shows the accuracy of
Stochastic Gradient Descent on the basis of above-mentioned parameters.
Table 6: Summarized result of the five Machine Learning models of Red Wine
Models Accuracy Precision Recall F1-Score
Naïve Bayes 0.85 0.50 0.74 0.60
SGD 0.84 0.37 0.15 0.21
KNN 0.88 0.62 0.38 0.47
Random Forest 0.89 0.71 0.43 0.53
SVM 0.88 0.71 0.26 0.37
Table 7: Summarized result of the five Machine Learning models of White Wine
Models Accuracy Precision Recall F1-Score
Naïve Bayes 0.72 0.43 0.70 0.54
SGD 0.78 0.63 0.18 0.28
KNN 0.82 0.65 0.52 0.58
Random Forest 0.88 0.82 0.60 0.70
SVM 0.82 0.75 0.34 0.47
The objective of this project was to analyze and compare the various algorithm in terms of their accuracy,
precision, recall, and f1-score. The expected results of this project are to find a clear cut line of various
classification algorithms and which is more accurate.
0.9 0.89
0.88 0.88
0.88
0.86 0.85
0.84
0.84
0.82
0.8
NAÏVE BAYES SGD KNN RANDOM SVM
FOREST
Figure 6: Comparison of all the five Machine Learning models for Red Wine
Figure 7: Comparison of all the five Machine Learning models for White Wine
From these, we can conclude that the most effective model for predicting white wine is Random Forest because
by comparing the algorithm based on the parameters its accuracy is 88 % and the second best is KNN and SVM
with an accuracy of 82 %. Naive Bayes is the least accurate.
V. CONCLUSION
In this study, I tried to predict the wine quality using five Classification Algorithms: Naïve Bayes, Stochastic
Gradient Descent (SGD), K-Nearest Neighbors (KNN), Random Forest, and Support Vector Machine (SVM). I
have pre-processed the data according to the requirement. Then applied the above five mentioned models for
finding the accuracy. The results obtain concludes that Random Forest is the best model to predict the wine
quality with an accuracy of 0.89 for red wine and an accuracy of 0.88 for white wine.
VI. REFERENCES
[1] Satyabrata Aich and Ahmed Abdulhakim Al-Absi,“Prediction of Quality for Different Type of Wine based
on Different Feature Sets Using Supervised Machine Learning Techniques”, ICACT Transactions on
Advanced Communications Technology (TACT) Vol. 7, Issue 3, May 2018.
[2] Eve Thullen and Tanhoo Kim in “White Wine Quality Prediction: A Big Data Case Study Based on MS
Azure “, June 2018.
[3] Fengjiao Fan and Jianping Li in “Mathematical Model Application Based on Statistics in the Evaluation
Analysis of Grape Wine Quality”,2015 IEEE.
[4] Gongzhu Hu and Tan Xi in “Classification of Wine Quality with Imbalanced Data”,2016 IEEE.
[5] Sunny Kumar and Kanika Agarwal in “Red Wine Quality Prediction using Machine Learning Techniques
“, 2020 International Conference on Computer Communication and Informatics (ICCCI -2020), Jan. 22-
24, 2020, Coimbatore, INDIA.
[6] Sinisa Ilic and Stefan Pitulic in “A Data Mining Approach to Wine Quality Prediction”2019.
[7] Shruthi P in “Wine Quality Prediction using Data Mining”,2019 IEEE.
[8] Zhou Tingwei in “Red Wine Quality prediction through Active Learning”,2021.
[9] Akanksha Trivedi in “Wine Quality Detection through Machine Learning Algorithms”, 2018 IEEE.
[10] Gonzalo Astray and Juan Carlos Mejuto in “Prediction Models to Control Aging Time in Red Wine”, Feb
2019.