Predicting Wine Quality
What determines an excellent wine?
Tons of work goes into producing just one bottle of wine. The best ingredients, the right fermentation environment and time. It's a spin of the wheel.
Grapes! The most important ingredient in crafting wine! Growing your own can be a huge hassle, but there are other options. These options include purchasing grapes either from small growers or local vineyards with leftovers. The goal is to use quality grapes and to be open to variety in order to experiment.
The interaction between the sugar in the grapes and yeast is the main step in creating wine. There are different kinds of yeast to be aware of since some can help create good quality wine while others result in a less desirable product. Another important concept is the environment you provide and length of fermentation time.
With a bit of study of the physicochemical components of wine that are the result of all your efforts, you can predict the success of your product. We used the Vinho Verde red wine dataset, from the north of Portugal, to study those components and how they can be used to make those predictions.
Get familiar with the physicochemical components of wine.
Gain insight from examining how each component relates to the quality score, and how each component relates to the others.
Correlation Matrix
So how do we help you design a killer wine? It's in the math.
Machine learning is the practice of using statistical algorithms to teach a computer to imitate the way humans process information. We can use it in wine production by teaching the computer to look at how physicochemical components in wine relate to the quality scores given to them by experts in the field.
We trained a lot of different machine learning models on the Vinho Verdi red wine dataset, and we got our best accuracy score from the Random Forests Classifier model. This model is like a really complex flow chart, with many decision trees combined into one. More trees means better predictions. Our model is 95% accurate.
A confusion matrix is a way to visualize the accuracy of your model. Actual quality values are mapped against the quality values predicted by our model. As you can see, our model is pretty darned accurate!
See if you can come up with a quality combination.
Wine Quality Score