The goal of this project was to explore data on the ratings of coffee cups through the use of data visualization and machine learning algorithms. The home page for this project was deployed via Google Cloud and can be found at https://uncfinalproject.uc.r.appspot.com/
- Programming/Scripting Languages
- Python
- JavaScript
- R
- HTML
- CSS
- Packages
- Plotly
- Plotly Express
- Pandas
- Scikit-learn
- D3
- Technologies/IDEs
- Jupyter Notebook
- Visual Studio Code
- Google Cloud
- MongoDB
- Flask API
Through maching learning algorithms, we chose to explore the relationship between how many points an individual taster gave a cup (Cupper Points) and the other variables mentioned above. For more in-depth explanations of these models, please refer to the methods page of our website.
The first step of our analysis, we used the random forest regressor in the scikit-learn Python package to discover which features contributed most to Cupper Points. These important features are pictured in the donut chart below.
In the next step of our analysis, we built a full linear model with all of these variables. The residuals were normal, but because variables that represented positive aspects of a coffee cup's taste (such as Sweetness) showed negative correlation with Cupper Points and variables that represented negative aspects of a coffee cup's taste (such as Category One Defects) showed positive correlation with Cupper Points, we sought a reduced model in hopes to find coefficients that were more interpretable.
We found success with a reduced linear model based on three variables: Flavor, Balance, and Aftertaste (the top three variables identified by the random forest regressor). Although the correlation coefficient was slightly weaker and the residuals were slightly less centered around zero, the coefficients make more sense intuitively than in the full model.