soft life, sharp mind — but make it wine 🍷

What Makes a Good Wine?

An interactive revisit of my graduate-school regression analysis exploring how the chemistry of Portuguese Vinho Verde relates to perceived white-wine quality.

Jada Mylan SmithSTAT 632 · CSU East BayOriginal analysis: 2022Portfolio refresh: 2026
the question

Can chemistry help explain wine quality?

The original project asked which measurable wine characteristics showed the strongest relationship with quality. We narrowed a combined red-and-white dataset to white wine and used multiple linear regression, correlation analysis, model selection, transformations, diagnostics and regression trees.

Portfolio note: This version currently visualizes the reported results from the 2022 project. A full row-level rerun can be wired in as soon as the original CSV is added to the repository.
meet the data

4,898 white wines. 11 measured attributes.

4,898
white-wine observations
11
chemical / physical measures
3–9
observed quality range
8
predictors retained in reduced model

Measures included acidity, sugar, chlorides, sulfur dioxide, density, pH, sulphates and alcohol. Quality was a discrete expert score, making the project suitable for both regression-style and classification-style thinking.

what stood out

Alcohol up. Volatile acidity down.

Alcohol

Positive relationship with quality in the regression model and the first split in the regression tree.

Volatile acidity

Negative relationship with quality. The original analysis applied a log transformation to better handle its skew.

Density

Also emerged as an important splitter in the full regression tree and showed a strong negative correlation with quality.

The fun takeaway from 2022: if I was choosing only from the variables in this dataset, higher alcohol and lower volatile acidity were two of the clearest signals associated with higher quality.

the model glow-up

Four versions, one modest ceiling

The original analysis progressively simplified and transformed the model. Adjusted R² improved only slightly, which is an important result itself: chemistry alone leaves a lot of human taste unexplained.

Full (lm1)
.2775AIC 11131
Reduced (lm2)
.2778AIC 11127
Log transform (lm3)
.2818AIC 11100
Outlier check (lm4)
.2861AIC 11058

Bars are normalized to the best adjusted R² among the four reported models, so the small differences are visible.

How to read the original coefficients

log(volatile acidity) carried a negative coefficient: holding the other variables constant, higher logged volatile acidity was associated with lower quality.

Alcohol carried a positive coefficient: holding the other variables constant, higher alcohol was associated with higher quality.

What the R² is telling us

Even the best reported version explained only about 29% of the variation in quality. That is not a failure; it is evidence that sensory ratings contain information the lab measurements do not capture — including human preference, context and possibly omitted production variables.

play with the original tree

Where would your wine land?

Move the sliders to explore the simplified alcohol + volatile-acidity rules reported in the 2022 regression tree.

Alcohol < 11
If volatile acidity ≥ 0.25 → reported node quality ≈ 5.4.
11 ≤ Alcohol < 12
Lower volatile acidity (< 0.47) → reported node quality ≈ 6.2.
Alcohol ≥ 12
Reported high-quality node ≈ 6.5.
2026 extension

If I rebuilt this analysis today…

01 · Respect the outcome

Quality is ordered and discrete. Compare ordinary regression with ordinal logistic regression instead of treating the score as purely continuous.

ordinal regressionmodel fit

02 · Predict out of sample

Add a train/test split and repeated cross-validation. Report MAE/RMSE and compare models based on how well they generalize.

cross-validationRMSE

03 · Test nonlinearity

Compare the interpretable linear model to random forest, gradient boosting and generalized additive models.

random forestGAM

04 · Bring red wine back

Model wine type explicitly and test whether alcohol, acidity or sulfur behave differently for red vs. white wines.

interactionssegmentation

05 · Explain predictions

Add permutation importance or SHAP-style explanations so a visitor can see why a model scores a particular wine higher or lower.

interpretabilityfeature importance

06 · Go beyond chemistry

If new data were available, add producer, vintage, region, fermentation/aging variables and sensory-panel information — the missing 70% is the interesting part.

feature engineeringdomain data
→ the next version becomes a real “build your wine” quality explorer