# Wine Quality

Analysis report, automatically produced by Diafunc.

Quality rating of Portuguese vinho verde wines predicted from 11 physicochemical tests.

- **Target:** Quality
- **Analyzed:** 2026-11-12 19:57 UTC
- **Data:** [UCI Machine Learning Repository](https://archive.ics.uci.edu/dataset/186/wine+quality), published under https://creativecommons.org/licenses/by/4.0/

## Summary

The model classifies the Quality target in this data, correctly ranking the levels in 27% of cases. The model relies most on Alcohol, with a smaller share from Volatile.acidity. Moving Alcohol from 9.50 to 11.3 raises the model's output by about 0.591 on average, with everything else as observed. Compared with always predicting the most common level, the model came out ahead by 36 points of weighted kappa on average; the two are about level, as this margin is negligible. On the held-out rows where the model's error and the yardstick's differ, the model was closer in 63% of cases.

The model did not substantially outperform simply predicting the most common quality level, so the margin is negligible and the two are about level. The formula uses a short structure but includes a specialist mathematical function, so it is not straightforward to read. A critical concern applies: 33% of rows are exact duplicates, which likely contaminated the held-out split, so the measured performance is not reliable. Validate on a fresh and deduplicated sample before relying on the model for decisions.

## Formula

```
Quality = 2.35 × asinh(Alcohol − 3.27) − 1.27 × Volatile.acidity
```

2 terms · additively decomposable

## Held-out diagnostics

| Target | Quality | Error | Accuracy | Quadratic weighted κ | MAE (levels) | Search rows | Generalization | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Quality | 27.15% | 72.52% | 0.5096 | 0.3604 | 0.5473 | 5198 | generalizing | 1299 |

- Quality · Quality 95% CI 22.9% to 31.15%
- Quality · Error 95% CI 68.54% to 76.74%
- Quality · Accuracy 95% CI 0.4819 to 0.5373

## Concerns

**CRITICAL** (data): Data has 33% exact duplicate rows: the held-out split is likely contaminated

2,172 of 6,497 rows (33%) are exact duplicates of at least one other row (largest duplicate group: 8 identical rows). At this density some duplicate pairs very likely straddle the held-out split, in which case the held-out R² or accuracy overstates how the model does on rows it has not seen. Deduplicate before deploying: drop the duplicates outright, or, where they encode intentional row weights, aggregate them into one weighted row. An analysis of the deduplicated data reads the headline metric without the inflation.

**WARNING** (model): Sparse ordinal level: 9

Level 9 of `Quality` has only 1 held-out sample (< 5), so its per-level metric is noisy. Read its recall with caution; consider gathering more examples of this level or merging it with an adjacent level.

## Analysis

The report opens with the Headline and the Concerns, followed by the Discovered Relations when the analysis has targets and by Questions & Answers when questions were asked. Three sections carry the detail: Model presents one model per target, Implications states where the models hold and what to weigh before relying on them, and Data describes the table as supplied, column by column, for reference.

Generated 2026-11-12 19:57 UTC, analysis `71f913c0-48b7-11f1-8087-d378640fe787`, 1 target, time budget 1 h 0 min, compute budget 500 credits, 6,497 rows. The Provenance & Audit chapter holds the full record.

## Validity

**Validity: valid.** Nothing in the data or the formula speaks against relying on this result.

*How to read this*

> Whether this result is one to rely on. Quality says how closely the formula follows the data; validity says whether that closeness means anything. A formula that only restates its target, or that reads a column which already holds the answer, can reach a high quality and still say nothing new about the data.

## What it found

Quality rises ever more slowly with Alcohol and falls with Volatile.acidity.

1. **Alcohol carries most of the model.** Alcohol accounts for 76% of what the formula explains and Volatile.acidity for 24%.
2. **The formula's value for Quality rises with Alcohol and falls with Volatile.acidity.** The formula's value for Quality rises with Alcohol and falls with Volatile.acidity when the other inputs stay at typical values.
3. **Density is not in the formula.** It has the second-strongest correlation with Quality in the table (-0.31). Rows with more of it have less Alcohol (correlation -0.69), and Alcohol is in the formula.
4. **The formula does better than always predicting the most common level.** The formula agrees with the recorded levels at a weighted kappa of 0.36; always predicting the most common level at 0.00. It removes 27% of the deviance of guessing the average level. That was measured on 1,299 rows it never saw.

## Summary

6 chapters, each headed by what it found.

### S.1 Alcohol carries most of the formula

*What the formula relies on.* Shares of the formula: Alcohol 76%, Volatile.acidity 24%.

Measured on 519 of the 5,198 rows the model was found on, which the search set apart for it. The model's score rises with Alcohol on every one of the 2,600 measured rows (exact derivative). The model's score falls with Volatile.acidity on every one of the 2,600 measured rows (exact derivative). Moving Alcohol from 9.50 to 11.3, its first and third quartile, with every other input as observed raises the model's score by 0.591 on average. These are measurements on the rows the search trained on, inside the observed ranges; outside them nothing is claimed.

**Table 5.1.3 · Which inputs matter most**

| Input | Share of importance | Permutation importance | Sensitivity | Residual correlation | Occurrences | Model's output as the input rises | Change, first to third quartile |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Alcohol | 75.66% | 0.6113 | 0.331 | -0.05513 | 1 | Rises (2600 of 2600 rows) | +0.5905 (9.5 to 11.3) |
| Volatile.acidity | 24.34% | 0.1967 | 1.27 | 0.0523 | 1 | Falls (2600 of 2600 rows) | -0.2413 (0.23 to 0.42) |

- **Rows the search trained on, measured:** 2600
- **N rows:** 519
- **Inputs the formula does not read:** Chlorides, Citric.acid, Density, Fixed.acidity, Free.sulfur.dioxide, pH, Residual.sugar, Sulphates, Total.sulfur.dioxide

Read as a sum, the formula has 2 additive terms. All of them are needed to reach 100% of the variation of the model's output on the 2,600 rows the search trained on: the largest are `2.35 × asinh(Alcohol − 3.27)` (75%) and `-1.27 × Volatile.acidity` (25%). A share describes the model's output, not the target. A term that reads one input has the same curve for every row, so the light curves of the held-out rows lie on the bold one.

- **Additive:** Yes
- **Rows the search trained on, measured:** 2600
- **Terms in the formula:** 2
- **Notation:** 2.35 × asinh(Alcohol − 3.27) − 1.27 × Volatile.acidity
- **Target:** Quality

### S.2 It holds on new rows: weighted kappa 0.36 held out, 0.34 on the training rows

*How well it holds.* The formula agrees with the recorded levels at a weighted kappa of 0.36; always predicting the most common level at 0.00. It removes 27% of the deviance of guessing the average level.

**How this was checked**

- Measured on 1,299 rows the formula never saw (20% of 6,497); the other 5,198 built it.
- Compared on the same rows against always predicting the most common level and always predicting the middle level.
- Intervals from 1,000 bootstrap resamples of those rows.

Quadratic-weighted kappa of 0.36 across 7 ordered levels on 1,299 rows the search never saw, **weak agreement**: only slightly better than chance on the ordering. Exact-level accuracy is 51%, mean level error 0.547.

- **Accuracy:** 0.5096 (95% CI 0.4819 to 0.5373)
- **Error:** 72.52% (95% CI 68.54% to 76.74%)
- **MAE levels:** 0.5473
- **N:** 1299
- **Training rows:** 5198
- **N levels:** 7
- **Quadratic weighted kappa:** 0.3604
- **Quality:** 27.15% (95% CI 22.9% to 31.15%)
- **Rows found on:** 5198
- **Target:** Quality

The model beats the strongest simple yardstick, always predicting the most common level, by 0.36 in weighted kappa on the 1,299 held-out rows. Row by row the margin is **negligible**: the model reads as roughly level with the yardstick. Of the 430 held-out rows where the two differ, the model is closer on 63% (95% interval 59% to 68%).

- **Best yardstick's score:** 0 (95% CI 0 to 0)
- **Effect size d:** 0.1551 (95% CI 0.1002 to 0.2067)
- **Effect size d magnitude:** negligible
- **Margin over the best yardstick:** 0.3604 (95% CI 0.3165 to 0.4015)
- **Margin's interval stays above zero:** Yes
- **Model:** 0.3604 (95% CI 0.3165 to 0.4015)
- **Held-out rows:** 1299
- **Held-out rows without an answer:** 0
- **Target:** Quality
- **Rows where the model is closer:** 63.26% (95% CI 58.6% to 67.68%)
- **Rows compared:** 430
- **Rows level:** 869

The model scores held-out rows about as well as training rows (held-out weighted kappa 0.36 on 1,299 rows, gap between training and held-out weighted kappa -0.0161): it **generalizes**. The structure the formula encodes carries from the training rows to the held-out rows.

- **Generalization gap:** -0.01608
- **Metric:** Quadratic weighted κ
- **N test:** 1299
- **Target:** Quality
- **Test error:** 0.5835 (95% CI 0.5578 to 0.6082)
- **Test metric:** 0.3604 (95% CI 0.3165 to 0.4015)
- **Train error:** 0.7802
- **Train metric:** 0.3443
- **Verdict:** Generalizing

### S.3 No range of its inputs where it is markedly weaker

*Where it is weak.* The largest miss on a held-out row is 3.34 (recorded 3, predicted 6.34). 2.2% of the held-out rows are unlike the rows it learned from.

Segment `chlorides` in the lowest quarter (0.009 to 0.037) performs **in line with the aggregate** (290 held-out rows): segment R² 0.195 against aggregate R² 0.276 (gap -0.0811). No quality drift detected.

**Table 6.2.1 · Quality by Input Range**

| Segment | Rows | R² | Gap to all rows | Verdict |
| --- | --- | --- | --- | --- |
| Chlorides = q1 | 290 | 0.1949 | -0.08113 | In line with all rows |
| Sulphates = q1 | 311 | 0.2317 | -0.04437 | In line with all rows |
| pH = q1 | 309 | 0.2173 | -0.05878 | In line with all rows |
| Residual.sugar = q1 | 296 | 0.2091 | -0.06691 | In line with all rows |
| Alcohol = q4 | 342 | 0.0803 | -0.19578 | In line with all rows |
| Density = q1 | 319 | 0.1810 | -0.09508 | In line with all rows |
| Residual.sugar = q4 | 303 | 0.1014 | -0.17468 | In line with all rows |
| Total.sulfur.dioxide = q3 | 319 | 0.2347 | -0.04137 | In line with all rows |
| Volatile.acidity = q1 | 321 | -0.0108 | -0.28686 | In line with all rows |
| Volatile.acidity = q3 | 321 | 0.2728 | -0.00320 | In line with all rows |

The first 10 rows of 24. The other 14 are in the notebook.

- **Aggregate MAE:** 0.5835
- **Aggregate R²:** 0.276
- **Measure:** r2
- **Target:** Quality

The worst held-out row was missed by 3.34 (target's scale). The 10 rows with the largest absolute residuals out of 1,299 held-out rows are shown. Each card breaks the failure down into per-term contributions and input values, so the failure mode is inspectable. A large residual with one concentrated term contribution means one term got this row wrong; a large residual with balanced contributions means a structural mismatch.

**Table 5.1.13 · Worst Predictions**

| Actual | Predicted | Residual | Alcohol | Volatile.acidity |
| --- | --- | --- | --- | --- |
| 3.000 | 6.342 | -3.342 | 11.7 | 0.24 |
| 3.000 | 5.724 | -2.724 | 9.7 | 0.23 |
| 9.000 | 6.376 | +2.624 | 12.4 | 0.36 |
| 3.000 | 5.588 | -2.588 | 9.4 | 0.25 |
| 8.000 | 5.426 | +2.574 | 8.8 | 0.19 |
| 8.000 | 5.426 | +2.574 | 8.8 | 0.19 |
| 8.000 | 5.454 | +2.546 | 8.9 | 0.2 |
| 3.000 | 5.529 | -2.529 | 9.9 | 0.44 |
| 4.000 | 6.502 | -2.502 | 12.7 | 0.32 |
| 4.000 | 6.219 | -2.219 | 11.4 | 0.27 |

- **Additive:** Yes
- **Expected coverage:** 0.8986
- **N extrapolated:** 0
- **Held-out rows:** 1299
- **Held-out rows for the interval:** 1299
- **Rows inside the interval:** 1174
- **Residual P5:** -1.167
- **Residual P95:** 1.203
- **Residual std:** 0.7419

29 of 1,299 held-out rows (2.2%) lie further from the training rows than 99 in 100 rows like them would, measured on the 2 inputs the model reads (`alcohol`, `volatile_acidity`). That is a **small minority**; the held-out figures describe the model on rows like the ones it was trained on.

**Table 6.3 · Rows unlike the ones the model learned from**

| Target | Inputs measured | Line | Held-out rows | Beyond the line | Share |
| --- | --- | --- | --- | --- | --- |
| Quality | Alcohol, Volatile.acidity | 3.035 | 1299 | 29 | 2.23% |

**Table 6.3 · Score bins · 24 of 30 rows shown**

| Count | From | To |
| --- | --- | --- |
| 27 | 0 | 0.253 |
| 96 | 0.253 | 0.507 |
| 150 | 0.507 | 0.76 |
| 250 | 0.76 | 1.014 |
| 196 | 1.014 | 1.267 |
| 185 | 1.267 | 1.521 |
| 162 | 1.521 | 1.774 |
| 105 | 1.774 | 2.028 |
| 42 | 2.028 | 2.281 |
| 28 | 2.281 | 2.535 |

The first 10 rows of 24. The other 14 are in the notebook.

### S.4 Not ready to use yet: 1 critical concern

*What to watch.* First: Data has 33% exact duplicate rows: the held-out split is likely contaminated.

**Table 3 · Concerns**

| Severity | Section | Concern | Detail |
| --- | --- | --- | --- |
| Critical | Data | Data has 33% exact duplicate rows: the held-out split is likely contaminated | 2,172 of 6,497 rows (33%) are exact duplicates of at least one other row (largest duplicate group: 8 identical rows). At this density some duplicate pairs very likely straddle the held-out split, in which case the held-out R² or accuracy overstates how the model does on rows it has not seen. Deduplicate before deploying: drop the duplicates outright, or, where they encode intentional row weights, aggregate them into one weighted row. An analysis of the deduplicated data reads the headline metric without the inflation. |
| Warning | Model | Sparse ordinal level: 9 | Level 9 of Quality has only 1 held-out sample (< 5), so its per-level metric is noisy. Read its recall with caution; consider gathering more examples of this level or merging it with an adjacent level. |

The analysis ran with the configuration below. The checks and the verdict of this chapter are read against it.

- **Targets**: 1 target: `quality`
- **Rows**: 6,497 rows
- **Per-Segment Predictions**: not produced, because no segment column was chosen
- **Fairness**: not assessed, because the data has no categorical column other than the target
- **Out-of-Distribution**: held-out rows are scored against the training rows; predictions made outside this report are not scored
- **Provenance & Audit**: recorded in the chapter of that name

Across 4 checks (4 pass, 0 warn, 0 fail, 1 critical concern), every check passes or warns, but **a critical concern is open**: **Not ready to use yet**. The Concerns chapter names what is open; it needs addressing before the predictions are used.

**Table 6.5 · Deployment Readiness**

| Name | Status | Detail |
| --- | --- | --- |
| Generalization | Pass | quality on the held-out rows matches quality on the rows the model was found on |
| Baseline Lift for Quality | Pass | beats the best yardstick by 0.36 in weighted kappa |
| Model Constraints | Pass | every held-out prediction is finite and within the training range |
| Out-of-Distribution | Pass | 2.2% of held-out rows are out of distribution |

- **N critical concerns:** 1
- **N fail:** 0
- **N pass:** 4
- **N warn:** 0
- **Overall verdict:** Not ready

### S.5 More rows of the same kind would firm it up

*What to collect next.*

- Collect more rows at the highest level of quality. Reason: the diagnostics flag that level 9 is sparse.
- Collect more rows with less duplication and verify no training row shares both inputs and output with the held-out set. Reason: 33% of the data are exact duplicate rows, so the split between training and held-out rows is likely contaminated.

### S.6 It shows how Quality moves with its inputs in these rows, not what causes it

*What this model does not show.* It was built on Alcohol from 8 to 14.9 and Volatile.acidity from 0.08 to 1.58; outside those ranges it has not been checked.

Diafunc found a formula that captures the structure in the training data. That structure is **correlative**: it states what predicts what in this data. It does **not** establish that any input *causes* the target.

A correlative model is the right tool for predicting the target on new rows like these, for exploring which inputs carry information about the target, and for an early-stage diagnostic or screening tool.

A correlative model is **not** the right tool for claiming that intervening on an input will change the target, for attributing a target's values to specific causes for accountability, or for choosing between policies that act on the inputs.

The Quality by Input Range, Fairness and Concerns chapters show the most common confounding patterns in the data.

The model is **correlative**: it captures which columns predict the target in the training data, not whether changing one would change the other. Predictions are reliable for inputs that look like the training distribution; they are **not** evidence that intervening on an input will change the target. The 4 upgrade pathways below show what evidence would support a causal claim.

**Table 6.4 · Upgrade pathways**

| Name | Summary |
| --- | --- |
| Controlled experiment | Randomize the input to be acted on, then analyze again. Randomization breaks confounding, so any change in the target is attributable to the input. |
| Natural experiment | Find a setting where the input varied for reasons unrelated to the target, an instrumental variable. Variation of that kind supports causal inference. |
| Causal graph | Write out what plausibly causes what, then check whether the model's terms are consistent with the conditional independences the graph implies. |
| Control for confounders | If a third variable plausibly moves both the input and the target, stratify by it or condition on it before training again. Gaps in the Quality by Input Range chapter are a clue. |

## Evidence

Every chapter of the analysis in full: the figures the story rests on, and everything else the analysis measured.

### 1 Headline

Diafunc modeled Quality from 11 columns, using 2 of them. The model classifies the recorded Quality correctly in 51% of cases, relying most on Alcohol, with which the model's output rises.

- One target was modeled; 1,299 rows were held out for checking.
- Always predicting the most common level agreed with the recorded level at a weighted kappa of 0; the model added 36 points, a slight margin, and was closer on 63% of the 430 held-out rows where the errors differed.
- The checks found a Critical concern: data has 33% exact duplicate rows, which means the held-out split is likely contaminated (1,299 rows checked).

- **Best quality:** 27.15%
- **Best target:** quality
- **Targets:** 1

### 2 Stakeholder Summary

The model classifies the Quality target in this data, correctly ranking the levels in 27% of cases. The model relies most on Alcohol, with a smaller share from Volatile.acidity. Moving Alcohol from 9.50 to 11.3 raises the model's output by about 0.591 on average, with everything else as observed. Compared with always predicting the most common level, the model came out ahead by 36 points of weighted kappa on average; the two are about level, as this margin is negligible. On the held-out rows where the model's error and the yardstick's differ, the model was closer in 63% of cases.

The model did not substantially outperform simply predicting the most common quality level, so the margin is negligible and the two are about level. The formula uses a short structure but includes a specialist mathematical function, so it is not straightforward to read. A critical concern applies: 33% of rows are exact duplicates, which likely contaminated the held-out split, so the measured performance is not reliable. Validate on a fresh and deduplicated sample before relying on the model for decisions.

### 3 Concerns

**Table 3 · Concerns**

| Severity | Section | Concern | Detail |
| --- | --- | --- | --- |
| Critical | Data | Data has 33% exact duplicate rows: the held-out split is likely contaminated | 2,172 of 6,497 rows (33%) are exact duplicates of at least one other row (largest duplicate group: 8 identical rows). At this density some duplicate pairs very likely straddle the held-out split, in which case the held-out R² or accuracy overstates how the model does on rows it has not seen. Deduplicate before deploying: drop the duplicates outright, or, where they encode intentional row weights, aggregate them into one weighted row. An analysis of the deduplicated data reads the headline metric without the inflation. |
| Warning | Model | Sparse ordinal level: 9 | Level 9 of Quality has only 1 held-out sample (< 5), so its per-level metric is noisy. Read its recall with caution; consider gathering more examples of this level or merging it with an adjacent level. |

*How to read this*

> Data-quality, model-quality, and deployment-risk issues detected during the analysis appear below, ordered by severity. Critical concerns are listed first; Warning and Info entries follow.

### 4 Discovered Relations

**Table 4 · Quality and error measured on the 1299 held-out rows**

| Target | Formula | Quality | Complexity | Error |
| --- | --- | --- | --- | --- |
| Quality | Quality = 2.35 × asinh(Alcohol − 3.27) − 1.27 × Volatile.acidity | 27.15% | 10.9% | 72.52% |

*How to read this*

> One model per target, each a formula with its quality, complexity and error. Higher quality at lower complexity describes the data most clearly. The findings below read the models together; the per-target chapters in the Model section carry each formula, its predictions and its diagnostics.

### 5 Model

The model's output for quality relies chiefly on alcohol, while volatile acidity plays a smaller role. Generalization quality is limited, and the strongest input explains about three quarters of the share of variation explained. Sparse representation of one ordinal level is flagged; see the Concerns chapter.

Most notable in the Model section:

- `Alcohol` carries most of the model (76% of its reliance on inputs)

*How to read this*

> The Model section presents one model per target: its formula, its predictions on held-out rows, the inputs it relies on, the baselines it is measured against, and diagnostics of how it behaves. With more than one target, the Composite Model, Multi-Output and Leaderboard chapters read the models as a set.

#### 5.1 Quality

The Model section builds one model for `Quality`: a formula that expresses it through the other columns. Diafunc searches the space of mathematical expressions for the formula that balances accuracy against simplicity, so the result is not a black box but an expression that can be read, evaluated and questioned. The chapters that follow show the formula, score it on rows it never saw during training, and take it apart term by term.

##### 5.1.1 Quality Model

The model's output relies most on Alcohol, and rises as Alcohol rises; it also relies on Volatile.acidity, and falls as Volatile.acidity rises.

```
Quality = 2.35 × asinh(Alcohol − 3.27) − 1.27 × Volatile.acidity
```

Quality 27.15% · Error 72.52% on 1299 rows the search never saw · Found on 5198 rows · Complexity 10.9%

**Table 5.1.1 · Constants of the formula**

| Value | 95% interval, given this formula | Role | Input | Unit |
| --- | --- | --- | --- | --- |
| 2.35 | 2.294 to 2.401 | Coefficient |  |  |
| 3.27 | 2.842 to 3.683 | Shift | Alcohol | Unit of Alcohol |
| 1.27 | 1.096 to 1.429 | Slope | Volatile.acidity | Output units per unit of Volatile.acidity |

- **Share of the output's variation they carry:** 100%
- **Rows the search trained on, measured:** 2600
- **Rows the search trained on:** 2600
- **Constants in the formula:** 3
- **Terms that reach 95% of the output's variation:** 2
- **Training rows:** 5198
- **Held-out rows:** 1299
- **Inputs the formula reads:** 2
- **Terms in the formula:** 2
- **Inputs the formula does not read:** Chlorides, Citric.acid, Density, Fixed.acidity, Free.sulfur.dioxide, pH, Residual.sugar, Sulphates, Total.sulfur.dioxide

*How to read this*

> The three gauges score the model on the held-out rows: rows that were set aside before the search and that the model never saw. They are the figures to quote for how the model does on new data.

**Table 5.1.1 · Quality Model**

| Metric | Meaning |
| --- | --- |
| Quality | How well the model predicts on the held-out rows, marked down for the size of its formula: 100% is an exact prediction, 0% is no better than always predicting the average. It is not R², and sits at or just below it |
| Error | How far the predictions lie from the held-out values, as a share of the miss of always predicting the average: 0% is an exact prediction, 100% is no better than the average |
| Complexity | The size of the formula as a share of the complexity the search was allowed: a low figure is a short formula |

> The figures under During the search are the same measures on the training rows. They are what the search ranked its candidates by, so they describe the search and tend to flatter the model it chose. The Generalization chapter sets the training rows beside the held-out rows, and the Baselines chapter sets the model beside its baselines. The time and credit gauges account for the computation that produced the model, not for the model itself.

##### 5.1.2 Prediction

The model predicts `Quality` for any row that supplies the other columns. This chapter applies it to the held-out rows, the rows set aside before training, so that the predictions can be compared with values the model never saw. The rows themselves and the function that predicts them are kept as reference under Foundation, with the processed data.

###### 5.1.2.1 Prediction Chart

Quadratic-weighted kappa of 0.36 across 7 ordered levels on 1,299 rows the search never saw, **weak agreement**: only slightly better than chance on the ordering. Exact-level accuracy is 51%, mean level error 0.547.

- **Accuracy:** 0.5096 (95% CI 0.4819 to 0.5373)
- **Error:** 72.52% (95% CI 68.54% to 76.74%)
- **MAE levels:** 0.5473
- **N:** 1299
- **Training rows:** 5198
- **N levels:** 7
- **Quadratic weighted kappa:** 0.3604
- **Quality:** 27.15% (95% CI 22.9% to 31.15%)
- **Rows found on:** 5198
- **Target:** Quality

*How to read this*

> Actual `Quality` on the horizontal axis against the model's predicted value on the vertical axis, for the held-out rows the model never saw during training. Points on the diagonal are perfect predictions; systematic vertical offsets reveal bias, vertical spread reveals noise, and points far from the diagonal are rows the model handles poorly. With 10,000 held-out rows or more, the rows are counted instead of drawn one point each: each cell is a range of the actual and a range of the predicted value, its color the number of rows that fall in both, and the cells whose two ranges match hold the rows the model predicts well.

###### 5.1.2.2 Held-out Level Support

- **N:** 1299
- **N levels:** 7

**Table 5.1.2.2 · Level support**

| Level | Support |
| --- | --- |
| 3 | 6 |
| 4 | 43 |
| 5 | 427 |
| 6 | 568 |
| 7 | 216 |
| 8 | 38 |
| 9 | 1 |

*How to read this*

> How many held-out rows fall on each level of `Quality`. Ordinal levels are rarely evenly occupied, and the counts here say which parts of the scale the held-out metrics actually measure: a level with few rows contributes little evidence, and an unoccupied level is not evidence at all.

##### 5.1.3 Which inputs matter most

Measured on 519 of the 5,198 rows the model was found on, which the search set apart for it. The model's score rises with Alcohol on every one of the 2,600 measured rows (exact derivative). The model's score falls with Volatile.acidity on every one of the 2,600 measured rows (exact derivative). Moving Alcohol from 9.50 to 11.3, its first and third quartile, with every other input as observed raises the model's score by 0.591 on average. These are measurements on the rows the search trained on, inside the observed ranges; outside them nothing is claimed.

**Table 5.1.3 · Which inputs matter most**

| Input | Share of importance | Permutation importance | Sensitivity | Residual correlation | Occurrences | Model's output as the input rises | Change, first to third quartile |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Alcohol | 75.66% | 0.6113 | 0.331 | -0.05513 | 1 | Rises (2600 of 2600 rows) | +0.5905 (9.5 to 11.3) |
| Volatile.acidity | 24.34% | 0.1967 | 1.27 | 0.0523 | 1 | Falls (2600 of 2600 rows) | -0.2413 (0.23 to 0.42) |

- **Rows the search trained on, measured:** 2600
- **N rows:** 519
- **Inputs the formula does not read:** Chlorides, Citric.acid, Density, Fixed.acidity, Free.sulfur.dioxide, pH, Residual.sugar, Sulphates, Total.sulfur.dioxide

*How to read this*

> The chart ranks the inputs of the `Quality` model by permutation importance: how much the model's error rises when that input's values are shuffled across rows so that it carries no information. A longer bar means the model relies on the input more. The order says which columns the model reads most, and those are the columns where measurement quality and data collection matter most. A short bar marks an input the model barely uses, which is a fact about this model and not a verdict on the column. Importance describes the model's reliance and nothing more: an input can rank high because it stands in for something the data does not contain. Where the search measured it, an input also carries the direction in which the model's output moves as the input rises, counted on the rows the search trained on, and the change of the output when the input alone goes from its first to its third quartile; both describe the formula inside the observed range and say nothing about causes.

##### 5.1.4 Baselines

The model beats the strongest simple yardstick, always predicting the most common level, by 0.36 in weighted kappa on the 1,299 held-out rows. Row by row the margin is **negligible**: the model reads as roughly level with the yardstick. Of the 430 held-out rows where the two differ, the model is closer on 63% (95% interval 59% to 68%).

- **Best yardstick's score:** 0 (95% CI 0 to 0)
- **Effect size d:** 0.1551 (95% CI 0.1002 to 0.2067)
- **Effect size d magnitude:** negligible
- **Margin over the best yardstick:** 0.3604 (95% CI 0.3165 to 0.4015)
- **Margin's interval stays above zero:** Yes
- **Model:** 0.3604 (95% CI 0.3165 to 0.4015)
- **Held-out rows:** 1299
- **Held-out rows without an answer:** 0
- **Target:** Quality
- **Rows where the model is closer:** 63.26% (95% CI 58.6% to 67.68%)
- **Rows compared:** 430
- **Rows level:** 869

*How to read this*

> The table scores the model for `Quality` against simple yardsticks on the same held-out rows. A yardstick is a predictor simple enough to need no explanation: a constant (the average, the middle value, the most common class or level, the average count), a plain regression on the numeric inputs (a straight line, a logistic regression, a Poisson regression), and for a series over time a forecast from its own past (the last value, the value one season back, the recent trend extended). Which of them appear depends on what kind of column `Quality` is. They are yardsticks only: the analysis has one model, and it is the last row. A regression yardstick answers every row the model answers: where one of its numeric inputs is empty, it reads the average of that input over the training rows. Nothing is filled in for the model. A yardstick whose row is empty could not be scored, and the summary then says what the margin is measured against.
> 
> Read the columns from top to bottom. Each kind of target is scored by the measure it is judged on: R² and MAE for a continuous value, with MASE added for a series (below 1 means a typical miss is smaller than the series' usual step from one row to the next); accuracy and balanced accuracy for a yes/no value, with the Brier score where a probability is predicted; accuracy and macro F1 for a class; weighted kappa and the distance in levels for an ordered level; Poisson deviance and RMSE for a count. When the model clears every yardstick by a wide margin, its structure earns its place. When it is level with the regression yardstick, a plain regression describes the data as well. When it is level with the constant, the inputs carry no usable signal for `Quality`.
> 
> The margin over the best yardstick comes with an interval. When that interval includes zero, the lead is not settled on this many held-out rows. The share of rows on which the model is closer than the best yardstick is counted only on the rows where the two differ; for a yes/no value or a class these are the rows where the two disagree.

##### 5.1.5 Generalization

The model scores held-out rows about as well as training rows (held-out weighted kappa 0.36 on 1,299 rows, gap between training and held-out weighted kappa -0.0161): it **generalizes**. The structure the formula encodes carries from the training rows to the held-out rows.

- **Generalization gap:** -0.01608
- **Metric:** Quadratic weighted κ
- **N test:** 1299
- **Target:** Quality
- **Test error:** 0.5835 (95% CI 0.5578 to 0.6082)
- **Test metric:** 0.3604 (95% CI 0.3165 to 0.4015)
- **Train error:** 0.7802
- **Train metric:** 0.3443
- **Verdict:** Generalizing

*How to read this*

> The chart sets the score of the `Quality` model on the rows it trained on beside its score on the held-out rows it never saw, and the gap between the two bars is the finding. The score is the one that suits the target: R² for a quantity, balanced accuracy for a yes/no target, weighted kappa for ordered levels. The held-out figure carries a bootstrap 95% confidence interval, which says how far it could move with a different held-out draw; the training bar has none, because it is measured on the rows that shaped the model.
> 
> The verdict reads from the two figures. **Generalizing**: the held-out score is strong, or training and held-out agree closely; the structure the formula encodes carries to new rows. **Overfit**: training is far ahead of held-out and the held-out score is not strong on its own; the formula has absorbed noise from the training rows, and the training figure overstates what to expect on new data. **Underfit or noisy**: held-out is far ahead of training; this is not strength, it usually means an outlier or a flat region in the training rows that the held-out rows happen to avoid. **Insufficient**: fewer than 30 held-out rows and no strong held-out score, too little evidence for a negative verdict. A model that predicts the same value for every held-out row gets no verdict: there is nothing that could carry over. In every case the width of the held-out interval says how much weight the gap can bear.

##### 5.1.6 How each term responds to its inputs

Read as a sum, the formula has 2 additive terms. All of them are needed to reach 100% of the variation of the model's output on the 2,600 rows the search trained on: the largest are `2.35 × asinh(Alcohol − 3.27)` (75%) and `-1.27 × Volatile.acidity` (25%). A share describes the model's output, not the target. A term that reads one input has the same curve for every row, so the light curves of the held-out rows lie on the bold one.

- **Additive:** Yes
- **Rows the search trained on, measured:** 2600
- **Terms in the formula:** 2
- **Notation:** 2.35 × asinh(Alcohol − 3.27) − 1.27 × Volatile.acidity
- **Target:** Quality

*How to read this*

> The formula for `Quality` is split into its additive terms, and each term is traced as one of its inputs moves across the training range. The bold curve holds the term's other inputs at their training medians: it is a profile of the term at the typical row, not an average over the data. Each light curve is one held-out row: the input on the axis moves, and the row keeps its own values for the term's other inputs.
> 
> A term that depends on several inputs gets one panel per input, and every one of those panels shows the same term. Where the light curves of a panel lie apart but run flat, the input on the axis moves the term little, and the spread comes from the term's other inputs. A term that reads one input has the same curve for every row, so its light curves lie on the bold one. A constant has no curve and is not counted as a term here. Terms the formula subtracts are drawn with their sign, so a curve below zero pulls the prediction down. At any fixed row, the terms and the constant add up to the model's prediction. Where the search measured it, a term also carries its share of the variation of the model's output on the rows the search trained on; that is a share of what the formula returns, not of `Quality` itself. The notebook lets the reader trim each range to the central 95% of the input. When the formula has no additive structure, the chapter traces the whole formula as a single term along each of its inputs, and the Sensitivity chapter is the better read for how the inputs combine.

##### 5.1.7 How the formula behaves outside the data

The model diverges beyond the observed range of `volatile_acidity`: predictions there are not supported by the formula's shape. How the model behaves beyond the observed range of `alcohol` could not be determined from the formula, so extrapolation there is not assessed. Extrapolate with caution.

- **Bounded at infinity:** No
- **Rows the search trained on, measured:** 2600
- **Inputs the formula reads:** 2
- **N singularities:** 0
- **Risky inputs:** volatile_acidity
- **Target:** Quality

**Table 5.1.7 · Limits at neg infinity**

| Input | Kind |
| --- | --- |
| Alcohol | Unknown |
| Volatile.acidity | Positive infinity |

**Table 5.1.7 · Limits at pos infinity**

| Input | Kind |
| --- | --- |
| Alcohol | Unknown |
| Volatile.acidity | Negative infinity |

*How to read this*

> The formula for `Quality` is read as a mathematical object, without data, to state how it behaves beyond the range it was trained on. A black box cannot answer that question; a formula can. For each input the chapter reports the limit as the input grows without bound in either direction (whether the formula diverges, settles to a finite value or oscillates, with the sign tracked exactly, so that a term like minus two times the cube of the input is reported as diverging downward on the right and upward on the left), whether the formula stays finite in every direction, and any singularity with its solved location: a division whose denominator reaches zero, a logarithm or square root whose argument leaves its domain, or a periodic pole.
> 
> The inputs along which the formula diverges or meets a singularity are listed as the risky ones; along them the formula's shape gives no support for extrapolation. A formula that stays finite everywhere with no singularity carries no structural hazard when extrapolated; the data still ends where it ends, and a prediction outside the training range remains unsupported by evidence. The plain-language summary at the end states the same facts in one paragraph.

##### 5.1.8 Contributions per term

- **Additive:** Yes
- **N rows:** 5

The notebook draws this chapter's figure from each held-out row; the row-by-row detail is there.

*How to read this*

> For up to five representative held-out rows, the chapter draws one bar chart showing how each additive term of the formula builds that row's prediction of `Quality`. The five rows are the worst prediction (largest absolute residual), the best (smallest), the median miss, the row with the smallest prediction and the row with the largest. When two roles fall on the same row, which is common with few held-out rows, the earlier role keeps it and fewer than five charts appear.
> 
> In each chart the bars stack the terms' contributions at the row's input values, terms the formula subtracts sit below zero, and the bars sum to the prediction. The dashed line marks the actual value; the distance between it and the top of the stack is the residual. The bars are evaluated at the same precision as the predictions, so they agree with the Prediction Chart. When the formula has no additive structure, each chart holds one bar for the whole formula, and the Sensitivity chapter is the better read for how individual inputs move it.

##### 5.1.9 What each term is worth

Full-formula R² is 0.276: weak overall quality. Ablation deltas are not very informative when the baseline quality is low; large drops are best-effort hints rather than definitive structural claims.

- **Additive:** Yes
- **Baseline R²:** 0.276
- **Held-out rows:** 1299

The notebook draws this chapter's figure from each held-out row; the row-by-row detail is there.

*How to read this*

> For each additive term of the formula for `Quality`, the chart shows how much the held-out R² drops when that term is replaced by its mean contribution, so that it no longer varies from row to row. The bars are sorted from the largest drop down, and the dashed line marks the R² of the full model.
> 
> A large drop means the term carries real predictive work; the complexity it adds is paid for. A small drop means the term adds little beyond its average value: it may refine a stronger term, or its curve in the chapter "How each term responds to its inputs" may be nearly flat. A negative drop means the held-out R² rises without the term, which is a sign that the term tracks noise in the training rows. Each figure describes what a term contributes inside the model as discovered; the chart diagnoses the model, it is not a guide to removing terms. When the formula has no additive structure, the chart shows one bar for the whole formula.

##### 5.1.10 What-If

**Table 5.1.10 · The prediction at the typical row: every input at its median or most common value**

| Item | Value |
| --- | --- |
| Alcohol | 10.3 |
| Volatile.acidity | 0.29 |
| Term 1 adds | 6.224 |
| Term 2 adds | -0.3683 |
| Prediction | 5.855 |

- **Additive:** Yes
- **Expected coverage:** 0.8986
- **Held-out rows for the interval:** 1299
- **Rows inside the interval:** 1174
- **Terms in the formula:** 2
- **Residual P5:** -1.167
- **Residual P95:** 1.203
- **Residual std:** 0.7419

*How to read this*

> The chapter shows the model's prediction for `Quality` at one input combination, with the contribution of each term stacked beneath it. The inputs start at their training medians, so the first view is the prediction for a typical row, and each input can move within the range the training rows cover; the notebook lets the reader change the inputs and watch the prediction and the stack update.
> 
> In the stack, a long bar marks the term that dominates at this input combination, often the one whose removal costs most in the chapter "What each term is worth". A short bar marks a term that makes a small adjustment here; the chapter "How each term responds to its inputs" shows whether it stays small everywhere or grows toward the edges of the range. A negative bar marks a term that pulls the prediction down at this point, either because the formula subtracts it or because it evaluates below zero.
> 
> The inputs stay inside the training range for a reason: the formula computes a value anywhere, but outside that range no training row supports it. When the formula has no additive structure, the stack holds a single bar for the whole formula and the inputs move the prediction directly.

##### 5.1.11 Sensitivity

The prediction responds to 2 inputs. The formula is additive: each curve below shows the change in the prediction per unit of one input (∂ŷ/∂xᵢ) independently. **Flat curves** mean a constant linear response, **bent curves** a non-linear response that depends on the position in the range, and **zero crossings** a response that reverses sign between regions.

- **Additive:** Yes
- **Terms in the formula:** 2

*How to read this*

> For each input, the chart traces the rate at which the predicted `Quality` changes as that input moves across its training range, with the other inputs held at their medians. The rate is the local slope of the prediction with respect to the input, measured by a small finite difference at each point. A table summarizes each input with the mean, minimum and maximum of the absolute slope, which ranks the inputs by how strongly the prediction responds to them.
> 
> A flat curve means the model is close to linear in that input: the prediction responds at the same rate everywhere in the observed range, which is easy to state and says nothing about values beyond that range. A curve that grows or shrinks marks diminishing or accelerating returns, and whether that is plausible is a question for the domain. A curve that crosses zero means the prediction rises with the input in one part of the range and falls in another, which is either a real optimum or a sign that the formula bends around a few rows. A curve with a large magnitude marks an input to which the prediction is highly responsive; the chapter "What each term is worth" says whether the term behind it also carries predictive work.
> 
> In the table, the mean absolute slope ranks the inputs by typical responsiveness. A minimum close to the maximum means the responsiveness is nearly constant; a wide gap means it varies strongly across the range. The chapter reads the whole formula, so it applies whether or not the formula splits into terms.

##### 5.1.12 How two inputs act together

Volatile_acidity enters linearly. No term reads two inputs, so the grid below renders empty; each input's contribution can be read independently in the chapter "How each term responds to its inputs".

- **Additive:** Yes
- **Inputs in different terms act separately:** Yes
- **Rows the search trained on, measured:** 2600
- **Inputs the formula is linear in:** Volatile.acidity
- **Terms in the formula:** 2
- **Input pairs not tested:** 0

*How to read this*

> When a single term of the formula combines two or more inputs, the prediction's response to one of them depends on the value of the other. This chapter draws one surface for each such pair: the predicted `Quality` across the plane of the two inputs, with every other input held at its training median. Pairs that never share a term have no interaction by construction, and the curves in the chapter "How each term responds to its inputs" already say everything about them. Where the search tested a pair, the summary says on how many pairs of rows the two inputs acted together in the model's output; that is a statement about the formula, not a finding that the data hold no other interaction.
> 
> Parallel stripes mean the two inputs act almost independently, so the surface is close to a sum of two one-input curves. Curved contours mean a real interaction, where the slope along one input changes with the other; the location of the peak or trough matters. A saddle, rising along one axis and falling along the other, marks a trade-off between the two. A sharp edge or cliff means the formula encodes a change of regime, and the curve for the same input in the chapter "How each term responds to its inputs" shows whether the bend appears there too.
> 
> The grid is deliberately coarse, and the color scale runs from low to high predictions. When the formula has no additive structure, the single whole-formula term holds every input, so every pair appears; the number of surfaces is capped for models with many inputs.

##### 5.1.13 Worst Predictions

The worst held-out row was missed by 3.34 (target's scale). The 10 rows with the largest absolute residuals out of 1,299 held-out rows are shown. Each card breaks the failure down into per-term contributions and input values, so the failure mode is inspectable. A large residual with one concentrated term contribution means one term got this row wrong; a large residual with balanced contributions means a structural mismatch.

**Table 5.1.13 · Worst Predictions**

| Actual | Predicted | Residual | Alcohol | Volatile.acidity |
| --- | --- | --- | --- | --- |
| 3.000 | 6.342 | -3.342 | 11.7 | 0.24 |
| 3.000 | 5.724 | -2.724 | 9.7 | 0.23 |
| 9.000 | 6.376 | +2.624 | 12.4 | 0.36 |
| 3.000 | 5.588 | -2.588 | 9.4 | 0.25 |
| 8.000 | 5.426 | +2.574 | 8.8 | 0.19 |
| 8.000 | 5.426 | +2.574 | 8.8 | 0.19 |
| 8.000 | 5.454 | +2.546 | 8.9 | 0.2 |
| 3.000 | 5.529 | -2.529 | 9.9 | 0.44 |
| 4.000 | 6.502 | -2.502 | 12.7 | 0.32 |
| 4.000 | 6.219 | -2.219 | 11.4 | 0.27 |

- **Additive:** Yes
- **Expected coverage:** 0.8986
- **N extrapolated:** 0
- **Held-out rows:** 1299
- **Held-out rows for the interval:** 1299
- **Rows inside the interval:** 1174
- **Residual P5:** -1.167
- **Residual P95:** 1.203
- **Residual std:** 0.7419

*How to read this*

> The held-out rows on which the model misses `Quality` by the most, sorted by absolute residual with the largest first and capped at ten. Each card shows the row's actual value, the prediction, the residual, the contribution of every additive term at that row and the row's input values. R² and MAE say how good the model is on average; these cards say where it fails and let each failure be read input by input and term by term.
> 
> A large residual with one dominant term means that term produced the wrong value at this row; the row's value for that input, read against its curve in the chapter "How each term responds to its inputs", shows whether it fell in a region the formula models poorly. A large residual with balanced contributions means every term was a little off and the sum still missed, which points to a shape the formula cannot represent in that region. Residuals that change sign from card to card mean the misses are not a consistent bias but scattered errors on particular rows. When the formula has no additive structure, each card shows a single whole-formula contribution.

##### 5.1.14 Level Distribution

Observed against predicted across 7 ordered levels (quadratic-weighted kappa 0.36). Level 3 is the weakest at 0% recall: the model rarely lands on it; the bars show whether it is shifted to an adjacent level.

- **Accuracy:** 0.5096
- **MAE levels:** 0.5473
- **N:** 1299
- **N levels:** 7
- **Quadratic weighted kappa:** 0.3604
- **Target:** Quality
- **Worst level:** 3
- **Worst recall:** 0

**Table 5.1.14 · Levels**

| Level | Observed | Predicted | Recall |
| --- | --- | --- | --- |
| 3 | 6 | 0 | 0 |
| 4 | 43 | 1 | 0 |
| 5 | 427 | 340 | 0.4637 |
| 6 | 568 | 869 | 0.75 |
| 7 | 216 | 89 | 0.1759 |
| 8 | 38 | 0 | 0 |
| 9 | 1 | 0 | 0 |

*How to read this*

> The chart sets the held-out count of `Quality` at each ordered level beside the number of rows the model placed there, with per-level recall and the quadratic-weighted kappa. The model predicts a number, and each prediction is rounded to the nearest level before it is compared with the actual.
> 
> A predicted distribution shifted one level from the observed one is the ordinal failure that plain accuracy hides: the model has the ordering roughly right but runs systematically high or low. The quadratic-weighted kappa is the headline figure because it credits near misses (predicting level 4 for an actual 5 costs far less than predicting 1) and corrects for chance: near 1 is strong agreement, 0 is chance, and a negative value is worse than chance. Per-level recall shows whether any level is rarely recovered.

##### 5.1.15 Search Progress

The search ran for 67 generations, ending at quality 0.211 (gain +0.211 from generation 2). The curve shows a substantial climb. The last improvement came after 90.6% of the search time: the search was still improving when it stopped, so a longer time limit is likely to find a better model.

- **First generation:** 2
- **First quality:** 0%
- **Last generation:** 68
- **Last improvement ms:** 3,260,917
- **Last quality:** 21.08%
- **Max quality:** 21.08%
- **N points:** 67
- **N total generations:** 67
- **Search time ms:** 3,599,267
- **Stop reason:** Maximum runtime reached

*How to read this*

> The line traces the best quality the search for the `Quality` model had reached at each generation, from the first generation to the last. Quality is the technology's combined score on the training rows, the figure the Model Metrics chapter defines. A curve that flattens well before the last generation means the search converged: the budget was more than enough, and the model is the one the search settled on. A curve still rising at the last generation means the budget ended before the search settled, and the model is the best the search reached within it. The chart describes the search, not the data: it says whether the search had time to settle, not whether more rows would help.

##### 5.1.16 Model Constraints

Across 1,299 held-out predictions, the formula is **mathematically well-behaved**: every output is finite, stays inside the training-target ±2σ band, and no prediction runs away beyond the bounded-prediction limit. It is safe to consume downstream at face value.

**Table 5.1.16 · Model Constraints**

| Name | Status | Detail |
| --- | --- | --- |
| Output coherent | Pass | no non-finite predictions across 1299 rows |
| Within domain | Pass | no rows outside the training target's ±2σ range across 1299 rows |
| Bounded predictions | Pass | no runaway predictions beyond ±10σ across 1299 rows |

- **Held-out rows:** 1299
- **N non finite:** 0
- **N outside domain:** 0
- **N runaway:** 0
- **Verdict:** Clean

*How to read this*

> Sanity checks on the `Quality` formula, run against the held-out rows. Three checks: every prediction is a finite number (output coherent), predictions stay within the range of the training target widened by two standard deviations on each side (within domain), and no single prediction runs away more than ten standard deviations from the training mean (bounded predictions).
> 
> These are pass or fail guards, not quality measures: a formula can clear all three and still predict poorly. A failure is the stronger signal. It means the formula misbehaves numerically somewhere in the data it was shown, and any downstream use of it should wait until that is understood.

##### 5.1.17 Modeling

*Measured during the search, on the rows the model was trained on*

- **MAE of a straight line through the inputs (same rows):** 0.5686
- **RMSE of a straight line through the inputs (same rows):** 0.7369
- **Training MAE (rows the search trained on):** 0.5876
- **MAE of always predicting the mean (same rows):** 0.6935
- **RMSE of always predicting the mean (same rows):** 0.8785
- **Training R² (rows the search trained on):** 0.2589
- **Training RMSE (rows the search trained on):** 0.7562
- **Rows the search trained on, measured:** 2600
- **Error:** 78.02%
- **Inputs the straight line used:** 11
- **N train:** 5198
- **Quality:** 21.08%

*How to read this*

> The function below trains the model for `Quality` on the processed data. Its output is the model that every other chapter of this section scores and dissects.

#### 5.2 Findings

1 finding from the model diagnostics (1 Warning) is listed in the Concerns chapter at the top of the analysis.

### 6 Implications

The Implications section states how to act on the models: the Stakeholder Summary and the Recommended Next Data, where the models hold and where they weaken (Quality by Input Range, Rows unlike the ones the model learned from, Per-Segment Predictions, Fairness), what to weigh before relying on them (Causal Honesty, Deployment Readiness), and the Provenance & Audit trail a reviewer needs to retrace the analysis.

#### 6.1 Recommended Next Data

- Collect more rows at the highest level of quality. Reason: the diagnostics flag that level 9 is sparse.
- Collect more rows with less duplication and verify no training row shares both inputs and output with the held-out set. Reason: 33% of the data are exact duplicate rows, so the split between training and held-out rows is likely contaminated.

#### 6.2 Quality by Input Range

Quality by Input Range splits the held-out rows by every usable column besides the target and compares the model's quality on each segment with its quality on all held-out rows. A column the model does not read, such as one left out because it leaks the target, is split as well: its segments show where the predictions are weak, not what the model uses. For a number the quality is R², the share of variation explained; for a yes-or-no target it is accuracy, the share of rows classified correctly, the measure the Classification Performance chapter reports. A numeric column is split into quartiles; a categorical column with at most ten values is split by value. A segment with fewer than three held-out rows is left out, because its gap would be noise.

The chart is sorted from the worst gap to the best. Each bar is the segment's figure minus the figure on all held-out rows.

- **Negative bars**: the model is weaker on these rows than on all held-out rows. A segment 0.25 or more below the overall value (25 points of accuracy) reads **much weaker**; a segment 0.10 to 0.25 below reads **weaker**. These are the segments to treat with caution.
- **Positive bars**: the model is stronger on these rows than overall. A strong segment can mask weakness elsewhere, so the negative segments come first.

##### 6.2.1 Quality by Input Range

Segment `chlorides` in the lowest quarter (0.009 to 0.037) performs **in line with the aggregate** (290 held-out rows): segment R² 0.195 against aggregate R² 0.276 (gap -0.0811). No quality drift detected.

**Table 6.2.1 · Quality by Input Range**

| Segment | Rows | R² | Gap to all rows | Verdict |
| --- | --- | --- | --- | --- |
| Chlorides = q1 | 290 | 0.1949 | -0.08113 | In line with all rows |
| Sulphates = q1 | 311 | 0.2317 | -0.04437 | In line with all rows |
| pH = q1 | 309 | 0.2173 | -0.05878 | In line with all rows |
| Residual.sugar = q1 | 296 | 0.2091 | -0.06691 | In line with all rows |
| Alcohol = q4 | 342 | 0.0803 | -0.19578 | In line with all rows |
| Density = q1 | 319 | 0.1810 | -0.09508 | In line with all rows |
| Residual.sugar = q4 | 303 | 0.1014 | -0.17468 | In line with all rows |
| Total.sulfur.dioxide = q3 | 319 | 0.2347 | -0.04137 | In line with all rows |
| Volatile.acidity = q1 | 321 | -0.0108 | -0.28686 | In line with all rows |
| Volatile.acidity = q3 | 321 | 0.2728 | -0.00320 | In line with all rows |

The first 10 rows of 24. The other 14 are in the notebook.

- **Aggregate MAE:** 0.5835
- **Aggregate R²:** 0.276
- **Measure:** r2
- **Target:** Quality

#### 6.3 Rows unlike the ones the model learned from

29 of 1,299 held-out rows (2.2%) lie further from the training rows than 99 in 100 rows like them would, measured on the 2 inputs the model reads (`alcohol`, `volatile_acidity`). That is a **small minority**; the held-out figures describe the model on rows like the ones it was trained on.

**Table 6.3 · Rows unlike the ones the model learned from**

| Target | Inputs measured | Line | Held-out rows | Beyond the line | Share |
| --- | --- | --- | --- | --- | --- |
| Quality | Alcohol, Volatile.acidity | 3.035 | 1299 | 29 | 2.23% |

**Table 6.3 · Score bins · 24 of 30 rows shown**

| Count | From | To |
| --- | --- | --- |
| 27 | 0 | 0.253 |
| 96 | 0.253 | 0.507 |
| 150 | 0.507 | 0.76 |
| 250 | 0.76 | 1.014 |
| 196 | 1.014 | 1.267 |
| 185 | 1.267 | 1.521 |
| 162 | 1.521 | 1.774 |
| 105 | 1.774 | 2.028 |
| 42 | 2.028 | 2.281 |
| 28 | 2.281 | 2.535 |

The first 10 rows of 24. The other 14 are in the notebook.

*How to read this*

> Out-of-distribution detection finds held-out rows that lie far from the training rows of a model. It looks only at the numeric inputs the model reads. Each of them is standardized against the mean and standard deviation of the training rows, and the standardized values are combined into one distance per row. The line a row is read against depends on the number of inputs: it is the distance that 99 in 100 rows like the training rows stay below. A row beyond the line is flagged as **out of distribution**, and the held-out figures are unlikely to apply to it. When the held-out rows resemble the training rows, about one row in a hundred is flagged.
> 
> The chart shows one bar per held-out row in row order; the flagged rows are the bars at or above the line. With more than one target, the chart shows the model with the largest flagged share, and the figures name it.
> 
> The check treats inputs independently, so it will not notice a rare combination of values that are each ordinary on their own, such as a large height with a small weight. It is a first screen. A decision that depends on catching unusual inputs needs a dedicated check.

#### 6.4 Causal Honesty

Diafunc found a formula that captures the structure in the training data. That structure is **correlative**: it states what predicts what in this data. It does **not** establish that any input *causes* the target.

A correlative model is the right tool for predicting the target on new rows like these, for exploring which inputs carry information about the target, and for an early-stage diagnostic or screening tool.

A correlative model is **not** the right tool for claiming that intervening on an input will change the target, for attributing a target's values to specific causes for accountability, or for choosing between policies that act on the inputs.

The Quality by Input Range, Fairness and Concerns chapters show the most common confounding patterns in the data.

The model is **correlative**: it captures which columns predict the target in the training data, not whether changing one would change the other. Predictions are reliable for inputs that look like the training distribution; they are **not** evidence that intervening on an input will change the target. The 4 upgrade pathways below show what evidence would support a causal claim.

**Table 6.4 · Upgrade pathways**

| Name | Summary |
| --- | --- |
| Controlled experiment | Randomize the input to be acted on, then analyze again. Randomization breaks confounding, so any change in the target is attributable to the input. |
| Natural experiment | Find a setting where the input varied for reasons unrelated to the target, an instrumental variable. Variation of that kind supports causal inference. |
| Causal graph | Write out what plausibly causes what, then check whether the model's terms are consistent with the conditional independences the graph implies. |
| Control for confounders | If a third variable plausibly moves both the input and the target, stratify by it or condition on it before training again. Gaps in the Quality by Input Range chapter are a clue. |

#### 6.5 Deployment Readiness

The analysis ran with the configuration below. The checks and the verdict of this chapter are read against it.

- **Targets**: 1 target: `quality`
- **Rows**: 6,497 rows
- **Per-Segment Predictions**: not produced, because no segment column was chosen
- **Fairness**: not assessed, because the data has no categorical column other than the target
- **Out-of-Distribution**: held-out rows are scored against the training rows; predictions made outside this report are not scored
- **Provenance & Audit**: recorded in the chapter of that name

Across 4 checks (4 pass, 0 warn, 0 fail, 1 critical concern), every check passes or warns, but **a critical concern is open**: **Not ready to use yet**. The Concerns chapter names what is open; it needs addressing before the predictions are used.

**Table 6.5 · Deployment Readiness**

| Name | Status | Detail |
| --- | --- | --- |
| Generalization | Pass | quality on the held-out rows matches quality on the rows the model was found on |
| Baseline Lift for Quality | Pass | beats the best yardstick by 0.36 in weighted kappa |
| Model Constraints | Pass | every held-out prediction is finite and within the training range |
| Out-of-Distribution | Pass | 2.2% of held-out rows are out of distribution |

- **N critical concerns:** 1
- **N fail:** 0
- **N pass:** 4
- **N warn:** 0
- **Overall verdict:** Not ready

#### 6.6 Provenance & Audit

This record captures the inputs and configuration that produced the report, so the analysis can be reproduced or the result defended in an audit.

**Table 6.6 · Provenance & Audit**

| Item | Value |
| --- | --- |
| Analysis ID | 71f913c0-48b7-11f1-8087-d378640fe787 |
| Run time | 2026-11-12 20:01 UTC |
| Total rows | 6,497 |
| Modeled targets | Quality |
| Segment column | not available |
| Time limit | 1 h 0 min |
| Time taken | 1 min 23 s |
| Credit budget | 500 credits |
| Ufinq version | 0.3.49 |
| Models kept from | run 4d605330-d30d-11f1-b255-3156534a926f, whose search found them; this report was built again around them |

### 7 Data

The strongest relationships among the variables involve sulfur dioxide, alcohol, density and residual sugar, all numeric columns. The dataset contains 33% exact duplicate rows, which is a critical concern for generalization and should be examined in the Concerns chapter.

Most notable in the Data section:

- `Free.sulfur.dioxide` and `Total.sulfur.dioxide` move together (correlation 0.721)
- `Alcohol` and `Density` move oppositely (correlation -0.687)
- `Density` and `Residual.sugar` move together (correlation 0.553)

*How to read this*

> The Data section describes the table as supplied, before any modeling: the Column Profiles overview of every column and its role, one chapter per column with its distribution and correlations, a closer look at columns with notable characteristics, Duplicate Rows, Leakage Suspicion, a map for paired coordinate columns, and the General chapter with descriptive statistics, correlations, missing values, outlier ranges, clusters and segments across all columns.

#### 7.1 Column Profiles

Profiled 12 columns across 6,497 rows (12 numeric, 0 non-numeric): every column is at least 75% populated. Distributional statistics on numeric columns can be read at face value. 6 columns are strongly skewed: the mean of such a column is pulled toward its long tail, so the median is the better guide to a typical value.

**Table 7.1 · Columns**

| Name | Role | Type | N | Missing | Mean | Std | Min | P25 | Median | P75 | Max | Skewness | CV |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Quality | Target | integer | 6497 | 0 | 5.818 | 0.873 | 3 | 5 | 6 | 6 | 9 | 0.1896 | 0.1501 |
| Alcohol | Input | number | 6497 | 0 | 10.49 | 1.19 | 8.00 | 9.50 | 10.30 | 11.30 | 14.90 | 0.5657 | 0.1137 |
| Chlorides | Input | number | 6497 | 0 | 0.05603 | 0.03503 | 0.00900 | 0.03800 | 0.04700 | 0.06500 | 0.61100 | 5.4 | 0.6252 |
| Citric.acid | Input | number | 6497 | 0 | 0.3186 | 0.1453 | 0.0000 | 0.2500 | 0.3100 | 0.3900 | 1.6600 | 0.4717 | 0.4561 |
| Density | Input | number | 6497 | 0 | 0.9947 | 0.0030 | 0.9871 | 0.9923 | 0.9949 | 0.9970 | 1.0390 | 0.5036 | 0.003015 |
| Fixed.acidity | Input | number | 6497 | 0 | 7.215 | 1.296 | 3.800 | 6.400 | 7.000 | 7.700 | 15.900 | 1.723 | 0.1797 |
| Free.sulfur.dioxide | Input | number | 6497 | 0 | 30.53 | 17.75 | 1.00 | 17.00 | 29.00 | 41.00 | 289.00 | 1.22 | 0.5815 |
| pH | Input | number | 6497 | 0 | 3.219 | 0.161 | 2.720 | 3.110 | 3.210 | 3.320 | 4.010 | 0.3868 | 0.04996 |
| Residual.sugar | Input | number | 6497 | 0 | 5.443 | 4.758 | 0.600 | 1.800 | 3.000 | 8.100 | 65.800 | 1.435 | 0.8741 |
| Sulphates | Input | number | 6497 | 0 | 0.5313 | 0.1488 | 0.2200 | 0.4300 | 0.5100 | 0.6000 | 2.0000 | 1.797 | 0.2801 |

The first 10 rows of 12. The other 2 are in the notebook.

- **N columns:** 12
- **N high missing:** 0
- **N rows:** 6497
- **N strongly skewed:** 6
- **Table branch:** main
- **Table ID:** 3c632f2d-5d0b-4d71-bb74-bfb570a68eb6

*How to read this*

> One row per column of the analyzed table: its role in the analysis (the target being predicted, an input it is predicted from, or the segment column), its type, value count and missing count, and for numeric columns the mean, standard deviation, minimum, quartiles, maximum and interquartile range. A column with 25% or more missing values is flagged; its mean and quartiles describe only the rows that have a value.
> 
> Two further figures describe the shape of a numeric column. The skewness says whether the values lean to one side: close to zero the column is symmetric, from 0.5 it is moderately skewed and from 1 strongly skewed, with the longer tail on the high side when the figure is positive and on the low side when it is negative. In a strongly skewed column the mean is pulled toward the tail, and the median is the better guide to a typical value. The coefficient of variation is the standard deviation divided by the mean: it compares how widely columns spread regardless of their units, and is given only for a column whose mean is positive.
> 
> These are the columns as supplied, before any modeling: the reference against which every later chapter reads.

#### 7.2 Alcohol

Alcohol: 8 to 14.9, median 10.3; moves opposite to `Density` most (r -0.687).

*How to read this*

> A column chapter profiles one column: its distribution in figures and charts, and how it relates to the other columns. It opens with one line on what the column holds. The Description chapter carries its figures, with every other column summarized for each of its values where it has few, and its association with every other column where it is numeric. The Visualization chapter carries its charts. A table with a date column adds an Over Time and a Time Series chapter; a target with classes adds a Class Balance chapter.

##### 7.2.1 Description

**Table 7.2.1 · Alcohol**

| Statistic | Value |
| --- | --- |
| Type | number |
| Values present | 6497 |
| Distinct values | 111 |
| Continuous | yes |
| Decimal places | 14 |
| Minimum | 8 |
| Maximum | 14.9 |
| Mean | 10.49 |
| Median | 10.3 |
| Mode | 9.5 |

The first 10 rows of 17. The other 7 are in the notebook.

*How to read this*

> The figures below summarize `Alcohol` in numbers: where its values center (mean, median, mode), how far they spread (range, variance, standard deviation, interquartile range) and how they are distributed across percentiles. They are the reference for every chart in the Visualization chapter and for the correlation measures further down.

> The figures for `Alcohol` are grouped: the column itself first, then where its values center, how far they spread, the shape of their distribution and its percentiles. Each statistic is explained in the Description chapter under General in the Data section.

###### 7.2.1.1 Correlation

**Table 7.2.1.1 · Correlations**

| Column | Pair of | Association | Pearson's r | 95% CI (Pearson) | Spearman's ρ | Kendall's τ | q-value | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Density | two numbers | 0.6994 | -0.6867 | -0.6994 to -0.6737 | -0.6994 | -0.5215 | < 0.001 | 6497 |
| Quality | two numbers | 0.4469 | 0.4443 | 0.4246 to 0.4636 | 0.4469 | 0.3524 | < 0.001 | 6497 |
| Chlorides | two numbers | 0.4013 | -0.2569 | -0.2795 to -0.2341 | -0.4013 | -0.2757 | < 0.001 | 6497 |
| Residual.sugar | two numbers | 0.3594 | -0.3594 | -0.3804 to -0.3381 | -0.3292 | -0.226 | < 0.001 | 6497 |
| Total.sulfur.dioxide | two numbers | 0.309 | -0.2657 | -0.2882 to -0.243 | -0.309 | -0.2063 | < 0.001 | 6497 |
| Free.sulfur.dioxide | two numbers | 0.186 | -0.1798 | -0.2033 to -0.1562 | -0.186 | -0.1234 | < 0.001 | 6497 |
| pH | two numbers | 0.1402 | 0.1212 | 0.09722 to 0.1451 | 0.1402 | 0.09692 | < 0.001 | 6497 |
| Fixed.acidity | two numbers | 0.1107 | -0.09545 | -0.1195 to -0.0713 | -0.1107 | -0.0743 | < 0.001 | 6497 |
| Volatile.acidity | two numbers | 0.03764 | -0.03764 | -0.0619 to -0.01334 | -0.02392 | -0.01349 | 0.002945 | 6497 |
| Citric.acid | two numbers | 0.01965 | -0.01049 | -0.0348 to 0.01383 | 0.01965 | 0.01357 | 0.4375 | 6497 |

The first 10 rows of 11. The other 1 is in the notebook.

*How to read this*

> Each row pairs `Alcohol` with one other column, numeric or categorical, and reports how strongly the two go together on an association from 0 to 1, and whether an association this strong could be chance. For another numeric column the row adds the direction: Pearson's coefficient measures a straight-line relationship, and Spearman's rho and Kendall's tau measure a monotonic relationship on ranks, which makes them resistant to outliers and lets them see a curved but consistently rising or falling pattern. For a categorical column the association is the correlation ratio η, which has no direction. A strong association is not an explanation: two columns can go together when a third one moves both.

> The table lists every other numeric or categorical column against `Alcohol`, with the pair's kind and association, three correlation coefficients and a confidence interval where the other column is numeric, the q-value and the rows the pair was measured on.

**Table 7.2.1.1 · Correlation**

| Measure | Meaning |
| --- | --- |
| Kind | What the other column holds: a number (numeric) or categories (numeric_categorical). A categorical column is one that is not numeric and holds between 2 and 50 distinct values |
| Association | The strength of the pair from 0 to 1. With a numeric column: the stronger of Pearson's coefficient and Spearman's ρ, without its sign. With a categorical column: the correlation ratio η, the square root of the share of Alcohol's spread that lies between the categories |
| Covariance | Numeric partner only. The direction of the relationship (positive or negative) in the units of the two columns. It is not standardized, so its size says little about strength without the columns' own spread |
| Pearson's Correlation Coefficient | Numeric partner only. The strength and direction of a linear relationship, from -1 (a perfect falling line) through 0 (no linear relationship) to 1 (a perfect rising line) |
| Spearman's ρ | Numeric partner only. The strength and direction of a monotonic relationship, computed on ranks rather than values, from -1 to 1. It follows a curved pattern as long as it rises or falls consistently, and outliers move it little |
| Kendall's τ | Numeric partner only. The strength and direction of association from the agreement and disagreement of rank order across pairs of rows, from -1 to 1. It is the steadier of the two rank measures when the rows are few |
| q-value | How likely a pair this strong is among unrelated columns, adjusted for the number of pairs involving Alcohol (Benjamini-Hochberg). Among all pairs reported with q below 0.05, about 5% or fewer are expected to be false discoveries |
| 95% CI (Pearson) | Numeric partner only. The lower and upper bounds of the 95% confidence interval on the Pearson coefficient, from the Fisher z-transform. An interval that contains 0 leaves the direction of the relationship open |
| Rows | The rows in which both columns hold a value. The q-value and the interval of a pair rest on this count |

##### 7.2.2 Visualization

The rows of `Alcohol` are not charted in their order: consecutive rows are no more alike than rows picked at random (a correlation of -0.06 between each value and the next), so the order carries no pattern to show.

*How to read this*

> The charts in this chapter were chosen from the type of `Alcohol` and of the columns it is compared with: a numeric column gets a histogram, a box plot and, when its row order carries a pattern, a value sequence, a categorical column gets a frequency chart, and its relation to each target of the analysis, and to the segment column when there is one, gets the chart that suits the pair, with the target on the vertical axis where it is a number. A column is not charted against every other column; which columns move together is shown under Strongest Correlations. The charts complement the figures in the Description chapter; the shape of a distribution and the position of its outliers are easier to see than to read.

#### 7.3 Chlorides

Chlorides: 0.009 to 0.611, median 0.047, skewed to high values; moves with `Sulphates` most (r 0.396).

##### 7.3.1 Description

**Table 7.3.1 · Chlorides**

| Statistic | Value |
| --- | --- |
| Type | number |
| Values present | 6497 |
| Distinct values | 214 |
| Continuous | yes |
| Decimal places | 3 |
| Minimum | 0.009 |
| Maximum | 0.611 |
| Mean | 0.05603 |
| Median | 0.047 |
| Mode | 0.044 |

The first 10 rows of 17. The other 7 are in the notebook.

###### 7.3.1.1 Correlation

**Table 7.3.1.1 · Correlations**

| Column | Pair of | Association | Pearson's r | 95% CI (Pearson) | Spearman's ρ | Kendall's τ | q-value | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Density | two numbers | 0.5907 | 0.3626 | 0.3413 to 0.3836 | 0.5907 | 0.4141 | < 0.001 | 6497 |
| Volatile.acidity | two numbers | 0.4159 | 0.3771 | 0.3561 to 0.3978 | 0.4159 | 0.2818 | < 0.001 | 6497 |
| Alcohol | two numbers | 0.4013 | -0.2569 | -0.2795 to -0.2341 | -0.4013 | -0.2757 | < 0.001 | 6497 |
| Sulphates | two numbers | 0.3956 | 0.3956 | 0.3749 to 0.4159 | 0.3705 | 0.2595 | < 0.001 | 6497 |
| Fixed.acidity | two numbers | 0.356 | 0.2982 | 0.2759 to 0.3202 | 0.356 | 0.2491 | < 0.001 | 6497 |
| Quality | two numbers | 0.2951 | -0.2007 | -0.2239 to -0.1772 | -0.2951 | -0.2289 | < 0.001 | 6497 |
| Total.sulfur.dioxide | two numbers | 0.2796 | -0.2796 | -0.3019 to -0.2571 | -0.2684 | -0.1517 | < 0.001 | 6497 |
| Free.sulfur.dioxide | two numbers | 0.2604 | -0.195 | -0.2183 to -0.1715 | -0.2604 | -0.1702 | < 0.001 | 6497 |
| pH | two numbers | 0.1635 | 0.04471 | 0.02041 to 0.06895 | 0.1635 | 0.1108 | < 0.001 | 6497 |
| Residual.sugar | two numbers | 0.1289 | -0.1289 | -0.1528 to -0.105 | -0.0358 | -0.01785 | < 0.001 | 6497 |

The first 10 rows of 11. The other 1 is in the notebook.

##### 7.3.2 Visualization

The rows of `Chlorides` are not charted in their order: consecutive rows are no more alike than rows picked at random (a correlation of -0.00 between each value and the next), so the order carries no pattern to show.

#### 7.4 Citric.acid

Citric.acid: 0 to 1.66, median 0.31; moves opposite to `Volatile.acidity` most (r -0.378).

##### 7.4.1 Description

**Table 7.4.1 · Citric.acid**

| Statistic | Value |
| --- | --- |
| Type | number |
| Values present | 6497 |
| Distinct values | 89 |
| Continuous | yes |
| Decimal places | 2 |
| Minimum | 0 |
| Maximum | 1.66 |
| Mean | 0.3186 |
| Median | 0.31 |
| Mode | 0.3 |

The first 10 rows of 17. The other 7 are in the notebook.

###### 7.4.1.1 Correlation

**Table 7.4.1.1 · Correlations**

| Column | Pair of | Association | Pearson's r | 95% CI (Pearson) | Spearman's ρ | Kendall's τ | q-value | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Volatile.acidity | two numbers | 0.378 | -0.378 | -0.3986 to -0.3569 | -0.2951 | -0.2015 | < 0.001 | 6497 |
| pH | two numbers | 0.3298 | -0.3298 | -0.3513 to -0.308 | -0.2859 | -0.1986 | < 0.001 | 6497 |
| Fixed.acidity | two numbers | 0.3244 | 0.3244 | 0.3025 to 0.346 | 0.2706 | 0.1903 | < 0.001 | 6497 |
| Total.sulfur.dioxide | two numbers | 0.1952 | 0.1952 | 0.1717 to 0.2185 | 0.1594 | 0.1126 | < 0.001 | 6497 |
| Residual.sugar | two numbers | 0.1425 | 0.1425 | 0.1185 to 0.1662 | 0.07492 | 0.05281 | < 0.001 | 6497 |
| Free.sulfur.dioxide | two numbers | 0.1331 | 0.1331 | 0.1092 to 0.1569 | 0.1221 | 0.08747 | < 0.001 | 6497 |
| Quality | two numbers | 0.1057 | 0.08553 | 0.06134 to 0.1096 | 0.1057 | 0.08216 | < 0.001 | 6497 |
| Density | two numbers | 0.09615 | 0.09615 | 0.07201 to 0.1202 | 0.06569 | 0.04103 | < 0.001 | 6497 |
| Chlorides | two numbers | 0.07408 | 0.039 | 0.0147 to 0.06326 | -0.07408 | -0.05055 | 0.001833 | 6497 |
| Sulphates | two numbers | 0.0562 | 0.0562 | 0.03192 to 0.08041 | 0.0369 | 0.02366 | < 0.001 | 6497 |

The first 10 rows of 11. The other 1 is in the notebook.

##### 7.4.2 Visualization

The rows of `Citric.acid` are not charted in their order: consecutive rows are no more alike than rows picked at random (a correlation of 0.00 between each value and the next), so the order carries no pattern to show.

#### 7.5 Density

Density: 0.987 to 1.04, median 0.995; moves opposite to `Alcohol` most (r -0.687).

##### 7.5.1 Description

**Table 7.5.1 · Density**

| Statistic | Value |
| --- | --- |
| Type | number |
| Values present | 6497 |
| Distinct values | 998 |
| Continuous | yes |
| Decimal places | 6 |
| Minimum | 0.9871 |
| Maximum | 1.039 |
| Mean | 0.9947 |
| Median | 0.9949 |
| Mode | 0.9972 |

The first 10 rows of 17. The other 7 are in the notebook.

###### 7.5.1.1 Correlation

**Table 7.5.1.1 · Correlations**

| Column | Pair of | Association | Pearson's r | 95% CI (Pearson) | Spearman's ρ | Kendall's τ | q-value | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Alcohol | two numbers | 0.6994 | -0.6867 | -0.6994 to -0.6737 | -0.6994 | -0.5215 | < 0.001 | 6497 |
| Chlorides | two numbers | 0.5907 | 0.3626 | 0.3413 to 0.3836 | 0.5907 | 0.4141 | < 0.001 | 6497 |
| Residual.sugar | two numbers | 0.5525 | 0.5525 | 0.5354 to 0.5692 | 0.5267 | 0.3822 | < 0.001 | 6497 |
| Fixed.acidity | two numbers | 0.4589 | 0.4589 | 0.4395 to 0.4779 | 0.4341 | 0.3038 | < 0.001 | 6497 |
| Quality | two numbers | 0.3228 | -0.3059 | -0.3277 to -0.2837 | -0.3228 | -0.248 | < 0.001 | 6497 |
| Sulphates | two numbers | 0.2748 | 0.2595 | 0.2367 to 0.282 | 0.2748 | 0.1885 | < 0.001 | 6497 |
| Volatile.acidity | two numbers | 0.2713 | 0.2713 | 0.2486 to 0.2937 | 0.2614 | 0.1743 | < 0.001 | 6497 |
| Citric.acid | two numbers | 0.09615 | 0.09615 | 0.07201 to 0.1202 | 0.06569 | 0.04103 | < 0.001 | 6497 |
| Total.sulfur.dioxide | two numbers | 0.06154 | 0.0324 | 0.008084 to 0.05667 | 0.06154 | 0.05094 | 0.01102 | 6497 |
| Free.sulfur.dioxide | two numbers | 0.02572 | 0.02572 | 0.0014 to 0.05 | 0.005841 | 0.001132 | 0.04201 | 6497 |

The first 10 rows of 11. The other 1 is in the notebook.

##### 7.5.2 Visualization

The rows of `Density` are not charted in their order: consecutive rows are no more alike than rows picked at random (a correlation of -0.01 between each value and the next), so the order carries no pattern to show.

#### 7.6 Fixed.acidity

Fixed.acidity: 3.80 to 15.9, median 7; moves with `Density` most (r 0.459).

##### 7.6.1 Description

**Table 7.6.1 · Fixed.acidity**

| Statistic | Value |
| --- | --- |
| Type | number |
| Values present | 6497 |
| Distinct values | 106 |
| Continuous | yes |
| Decimal places | 2 |
| Minimum | 3.8 |
| Maximum | 15.9 |
| Mean | 7.215 |
| Median | 7 |
| Mode | 6.8 |

The first 10 rows of 17. The other 7 are in the notebook.

###### 7.6.1.1 Correlation

**Table 7.6.1.1 · Correlations**

| Column | Pair of | Association | Pearson's r | 95% CI (Pearson) | Spearman's ρ | Kendall's τ | q-value | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Density | two numbers | 0.4589 | 0.4589 | 0.4395 to 0.4779 | 0.4341 | 0.3038 | < 0.001 | 6497 |
| Chlorides | two numbers | 0.356 | 0.2982 | 0.2759 to 0.3202 | 0.356 | 0.2491 | < 0.001 | 6497 |
| Total.sulfur.dioxide | two numbers | 0.3291 | -0.3291 | -0.3506 to -0.3072 | -0.2333 | -0.1537 | < 0.001 | 6497 |
| Citric.acid | two numbers | 0.3244 | 0.3244 | 0.3025 to 0.346 | 0.2706 | 0.1903 | < 0.001 | 6497 |
| Sulphates | two numbers | 0.2996 | 0.2996 | 0.2773 to 0.3215 | 0.2201 | 0.1525 | < 0.001 | 6497 |
| Free.sulfur.dioxide | two numbers | 0.2827 | -0.2827 | -0.305 to -0.2602 | -0.2599 | -0.1779 | < 0.001 | 6497 |
| pH | two numbers | 0.2527 | -0.2527 | -0.2753 to -0.2298 | -0.25 | -0.1725 | < 0.001 | 6497 |
| Volatile.acidity | two numbers | 0.219 | 0.219 | 0.1957 to 0.242 | 0.2003 | 0.1341 | < 0.001 | 6497 |
| Residual.sugar | two numbers | 0.112 | -0.112 | -0.1359 to -0.0879 | -0.03225 | -0.01881 | < 0.001 | 6497 |
| Alcohol | two numbers | 0.1107 | -0.09545 | -0.1195 to -0.0713 | -0.1107 | -0.0743 | < 0.001 | 6497 |

The first 10 rows of 11. The other 1 is in the notebook.

##### 7.6.2 Visualization

The rows of `Fixed.acidity` are not charted in their order: consecutive rows are no more alike than rows picked at random (a correlation of 0.01 between each value and the next), so the order carries no pattern to show.

#### 7.7 Free.sulfur.dioxide

Free.sulfur.dioxide: 1 to 289, median 29; moves with `Total.sulfur.dioxide` most (r 0.721).

##### 7.7.1 Description

**Table 7.7.1 · Free.sulfur.dioxide**

| Statistic | Value |
| --- | --- |
| Type | number |
| Values present | 6497 |
| Distinct values | 135 |
| Continuous | yes |
| Decimal places | 1 |
| Minimum | 1 |
| Maximum | 289 |
| Mean | 30.53 |
| Median | 29 |
| Mode | 29.0 |

The first 10 rows of 17. The other 7 are in the notebook.

###### 7.7.1.1 Correlation

**Table 7.7.1.1 · Correlations**

| Column | Pair of | Association | Pearson's r | 95% CI (Pearson) | Spearman's ρ | Kendall's τ | q-value | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Total.sulfur.dioxide | two numbers | 0.7414 | 0.7209 | 0.709 to 0.7324 | 0.7414 | 0.5595 | < 0.001 | 6497 |
| Residual.sugar | two numbers | 0.4029 | 0.4029 | 0.3823 to 0.423 | 0.3878 | 0.2638 | < 0.001 | 6497 |
| Volatile.acidity | two numbers | 0.3657 | -0.3526 | -0.3737 to -0.3311 | -0.3657 | -0.248 | < 0.001 | 6497 |
| Fixed.acidity | two numbers | 0.2827 | -0.2827 | -0.305 to -0.2602 | -0.2599 | -0.1779 | < 0.001 | 6497 |
| Chlorides | two numbers | 0.2604 | -0.195 | -0.2183 to -0.1715 | -0.2604 | -0.1702 | < 0.001 | 6497 |
| Sulphates | two numbers | 0.2211 | -0.1885 | -0.2118 to -0.1649 | -0.2211 | -0.1507 | < 0.001 | 6497 |
| Alcohol | two numbers | 0.186 | -0.1798 | -0.2033 to -0.1562 | -0.186 | -0.1234 | < 0.001 | 6497 |
| pH | two numbers | 0.1647 | -0.1459 | -0.1696 to -0.122 | -0.1647 | -0.1118 | < 0.001 | 6497 |
| Citric.acid | two numbers | 0.1331 | 0.1331 | 0.1092 to 0.1569 | 0.1221 | 0.08747 | < 0.001 | 6497 |
| Quality | two numbers | 0.08687 | 0.05546 | 0.03119 to 0.07967 | 0.08687 | 0.06671 | < 0.001 | 6497 |

The first 10 rows of 11. The other 1 is in the notebook.

##### 7.7.2 Visualization

The rows of `Free.sulfur.dioxide` are not charted in their order: consecutive rows are no more alike than rows picked at random (a correlation of -0.01 between each value and the next), so the order carries no pattern to show.

#### 7.8 pH

pH: 2.72 to 4.01, median 3.21; moves opposite to `Citric.acid` most (r -0.33).

##### 7.8.1 Description

**Table 7.8.1 · pH**

| Statistic | Value |
| --- | --- |
| Type | number |
| Values present | 6497 |
| Distinct values | 108 |
| Continuous | yes |
| Decimal places | 2 |
| Minimum | 2.72 |
| Maximum | 4.01 |
| Mean | 3.219 |
| Median | 3.21 |
| Mode | 3.16 |

The first 10 rows of 17. The other 7 are in the notebook.

###### 7.8.1.1 Correlation

**Table 7.8.1.1 · Correlations**

| Column | Pair of | Association | Pearson's r | 95% CI (Pearson) | Spearman's ρ | Kendall's τ | q-value | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Citric.acid | two numbers | 0.3298 | -0.3298 | -0.3513 to -0.308 | -0.2859 | -0.1986 | < 0.001 | 6497 |
| Residual.sugar | two numbers | 0.2673 | -0.2673 | -0.2898 to -0.2446 | -0.2293 | -0.1599 | < 0.001 | 6497 |
| Volatile.acidity | two numbers | 0.2615 | 0.2615 | 0.2387 to 0.284 | 0.1949 | 0.1357 | < 0.001 | 6497 |
| Sulphates | two numbers | 0.2543 | 0.1921 | 0.1686 to 0.2154 | 0.2543 | 0.1744 | < 0.001 | 6497 |
| Fixed.acidity | two numbers | 0.2527 | -0.2527 | -0.2753 to -0.2298 | -0.25 | -0.1725 | < 0.001 | 6497 |
| Total.sulfur.dioxide | two numbers | 0.2427 | -0.2384 | -0.2612 to -0.2153 | -0.2427 | -0.1632 | < 0.001 | 6497 |
| Free.sulfur.dioxide | two numbers | 0.1647 | -0.1459 | -0.1696 to -0.122 | -0.1647 | -0.1118 | < 0.001 | 6497 |
| Chlorides | two numbers | 0.1635 | 0.04471 | 0.02041 to 0.06895 | 0.1635 | 0.1108 | < 0.001 | 6497 |
| Alcohol | two numbers | 0.1402 | 0.1212 | 0.09722 to 0.1451 | 0.1402 | 0.09692 | < 0.001 | 6497 |
| Quality | two numbers | 0.03254 | 0.01951 | -0.004814 to 0.0438 | 0.03254 | 0.02522 | 0.1275 | 6497 |

The first 10 rows of 11. The other 1 is in the notebook.

##### 7.8.2 Visualization

The rows of `pH` are not charted in their order: consecutive rows are no more alike than rows picked at random (a correlation of -0.02 between each value and the next), so the order carries no pattern to show.

#### 7.9 Quality

Quality: 3 to 9, median 6, skewed to low values, 7 distinct values; moves with `Alcohol` most (r 0.444).

##### 7.9.1 Description

**Table 7.9.1 · Quality**

| Statistic | Value |
| --- | --- |
| Type | integer |
| Values present | 6497 |
| Distinct values | 7 |
| Continuous | no |
| Decimal places | 0 |
| Minimum | 3 |
| Maximum | 9 |
| Mean | 5.818 |
| Median | 6 |
| Mode | 6 |

The first 10 rows of 17. The other 7 are in the notebook.

**Table 7.9.1 · Rows per value**

| Variable | Value | Rows | Share |
| --- | --- | --- | --- |
| Quality | 3 | 30 | 0.4618% |
| Quality | 4 | 216 | 3.325% |
| Quality | 5 | 2138 | 32.91% |
| Quality | 6 | 2836 | 43.65% |
| Quality | 7 | 1079 | 16.61% |
| Quality | 8 | 193 | 2.971% |
| Quality | 9 | 5 | 0.07696% |

###### 7.9.1.1 By Value

**Table 7.9.1.1 · Mean per value of Quality**

| Quality | Rows | Chlorides | Total.sulfur.dioxide | Alcohol | Citric.acid | Density | pH | Fixed.acidity | Free.sulfur.dioxide | Residual.sugar | Sulphates | Volatile.acidity |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 3 | 30 | 0.07703 | 122 | 10.22 | 0.281 | 0.9957 | 3.258 | 7.853 | 39.22 | 5.14 | 0.5063 | 0.517 |
| 4 | 216 | 0.06006 | 103.4 | 10.18 | 0.2723 | 0.9948 | 3.232 | 7.289 | 20.64 | 4.154 | 0.5056 | 0.458 |
| 5 | 2138 | 0.06467 | 120.8 | 9.838 | 0.3077 | 0.9958 | 3.212 | 7.327 | 30.24 | 5.804 | 0.5264 | 0.3896 |
| 6 | 2836 | 0.05416 | 115.4 | 10.59 | 0.3236 | 0.9946 | 3.218 | 7.177 | 31.17 | 5.55 | 0.5325 | 0.3139 |
| 7 | 1079 | 0.04527 | 108.5 | 11.39 | 0.3348 | 0.9931 | 3.228 | 7.129 | 30.42 | 4.732 | 0.547 | 0.2888 |
| 8 | 193 | 0.04112 | 117.5 | 11.68 | 0.3325 | 0.9925 | 3.223 | 6.835 | 34.53 | 5.383 | 0.5125 | 0.291 |
| 9 | 5 | 0.0274 | 116 | 12.18 | 0.386 | 0.9915 | 3.308 | 7.42 | 33.4 | 4.12 | 0.466 | 0.298 |

*How to read this*

> The rows are grouped by the value of `Quality`, and every other column is summarized within each group with the same descriptive statistics. A statistic that shifts from group to group marks a column that moves with `Quality`; one that stays level marks a column that does not. Groups with few rows produce unstable figures, so the row count of each group is the first thing to read. Where the groups differ in a target by more than chance would give, the chapter states by how much; it states that the two go together, not that one brings the other about.

###### 7.9.1.2 Correlation

**Table 7.9.1.2 · Correlations**

| Column | Pair of | Association | Pearson's r | 95% CI (Pearson) | Spearman's ρ | Kendall's τ | q-value | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Alcohol | two numbers | 0.4469 | 0.4443 | 0.4246 to 0.4636 | 0.4469 | 0.3524 | < 0.001 | 6497 |
| Density | two numbers | 0.3228 | -0.3059 | -0.3277 to -0.2837 | -0.3228 | -0.248 | < 0.001 | 6497 |
| Chlorides | two numbers | 0.2951 | -0.2007 | -0.2239 to -0.1772 | -0.2951 | -0.2289 | < 0.001 | 6497 |
| Volatile.acidity | two numbers | 0.2657 | -0.2657 | -0.2882 to -0.243 | -0.2578 | -0.1991 | < 0.001 | 6497 |
| Citric.acid | two numbers | 0.1057 | 0.08553 | 0.06134 to 0.1096 | 0.1057 | 0.08216 | < 0.001 | 6497 |
| Fixed.acidity | two numbers | 0.09815 | -0.07674 | -0.1009 to -0.05252 | -0.09815 | -0.07599 | < 0.001 | 6497 |
| Free.sulfur.dioxide | two numbers | 0.08687 | 0.05546 | 0.03119 to 0.07967 | 0.08687 | 0.06671 | < 0.001 | 6497 |
| Total.sulfur.dioxide | two numbers | 0.05478 | -0.04139 | -0.06564 to -0.01709 | -0.05478 | -0.04228 | 0.001166 | 6497 |
| Sulphates | two numbers | 0.03849 | 0.03849 | 0.01418 to 0.06274 | 0.02983 | 0.02368 | 0.002344 | 6497 |
| Residual.sugar | two numbers | 0.03698 | -0.03698 | -0.06124 to -0.01268 | -0.01689 | -0.0131 | 0.003158 | 6497 |

The first 10 rows of 11. The other 1 is in the notebook.

##### 7.9.2 Visualization

The rows of `Quality` are not charted in their order: consecutive rows are no more alike than rows picked at random (a correlation of -0.17 between each value and the next), so the order carries no pattern to show.

#### 7.10 Residual.sugar

Residual.sugar: 0.6 to 65.8, median 3, skewed to high values; moves with `Density` most (r 0.553).

##### 7.10.1 Description

**Table 7.10.1 · Residual.sugar**

| Statistic | Value |
| --- | --- |
| Type | number |
| Values present | 6497 |
| Distinct values | 316 |
| Continuous | yes |
| Decimal places | 2 |
| Minimum | 0.6 |
| Maximum | 65.8 |
| Mean | 5.443 |
| Median | 3 |
| Mode | 2.0 |

The first 10 rows of 17. The other 7 are in the notebook.

###### 7.10.1.1 Correlation

**Table 7.10.1.1 · Correlations**

| Column | Pair of | Association | Pearson's r | 95% CI (Pearson) | Spearman's ρ | Kendall's τ | q-value | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Density | two numbers | 0.5525 | 0.5525 | 0.5354 to 0.5692 | 0.5267 | 0.3822 | < 0.001 | 6497 |
| Total.sulfur.dioxide | two numbers | 0.4955 | 0.4955 | 0.4769 to 0.5136 | 0.4549 | 0.3054 | < 0.001 | 6497 |
| Free.sulfur.dioxide | two numbers | 0.4029 | 0.4029 | 0.3823 to 0.423 | 0.3878 | 0.2638 | < 0.001 | 6497 |
| Alcohol | two numbers | 0.3594 | -0.3594 | -0.3804 to -0.3381 | -0.3292 | -0.226 | < 0.001 | 6497 |
| pH | two numbers | 0.2673 | -0.2673 | -0.2898 to -0.2446 | -0.2293 | -0.1599 | < 0.001 | 6497 |
| Volatile.acidity | two numbers | 0.196 | -0.196 | -0.2193 to -0.1725 | -0.06438 | -0.05302 | < 0.001 | 6497 |
| Sulphates | two numbers | 0.1859 | -0.1859 | -0.2093 to -0.1623 | -0.1382 | -0.09228 | < 0.001 | 6497 |
| Citric.acid | two numbers | 0.1425 | 0.1425 | 0.1185 to 0.1662 | 0.07492 | 0.05281 | < 0.001 | 6497 |
| Chlorides | two numbers | 0.1289 | -0.1289 | -0.1528 to -0.105 | -0.0358 | -0.01785 | < 0.001 | 6497 |
| Fixed.acidity | two numbers | 0.112 | -0.112 | -0.1359 to -0.0879 | -0.03225 | -0.01881 | < 0.001 | 6497 |

The first 10 rows of 11. The other 1 is in the notebook.

##### 7.10.2 Visualization

The rows of `Residual.sugar` are not charted in their order: consecutive rows are no more alike than rows picked at random (a correlation of -0.01 between each value and the next), so the order carries no pattern to show.

#### 7.11 Sulphates

Sulphates: 0.22 to 2, median 0.51; moves with `Chlorides` most (r 0.396).

##### 7.11.1 Description

**Table 7.11.1 · Sulphates**

| Statistic | Value |
| --- | --- |
| Type | number |
| Values present | 6497 |
| Distinct values | 111 |
| Continuous | yes |
| Decimal places | 2 |
| Minimum | 0.22 |
| Maximum | 2 |
| Mean | 0.5313 |
| Median | 0.51 |
| Mode | 0.5 |

The first 10 rows of 17. The other 7 are in the notebook.

###### 7.11.1.1 Correlation

**Table 7.11.1.1 · Correlations**

| Column | Pair of | Association | Pearson's r | 95% CI (Pearson) | Spearman's ρ | Kendall's τ | q-value | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Chlorides | two numbers | 0.3956 | 0.3956 | 0.3749 to 0.4159 | 0.3705 | 0.2595 | < 0.001 | 6497 |
| Fixed.acidity | two numbers | 0.2996 | 0.2996 | 0.2773 to 0.3215 | 0.2201 | 0.1525 | < 0.001 | 6497 |
| Total.sulfur.dioxide | two numbers | 0.2757 | -0.2757 | -0.298 to -0.2531 | -0.2567 | -0.1648 | < 0.001 | 6497 |
| Density | two numbers | 0.2748 | 0.2595 | 0.2367 to 0.282 | 0.2748 | 0.1885 | < 0.001 | 6497 |
| Volatile.acidity | two numbers | 0.255 | 0.226 | 0.2028 to 0.2489 | 0.255 | 0.1734 | < 0.001 | 6497 |
| pH | two numbers | 0.2543 | 0.1921 | 0.1686 to 0.2154 | 0.2543 | 0.1744 | < 0.001 | 6497 |
| Free.sulfur.dioxide | two numbers | 0.2211 | -0.1885 | -0.2118 to -0.1649 | -0.2211 | -0.1507 | < 0.001 | 6497 |
| Residual.sugar | two numbers | 0.1859 | -0.1859 | -0.2093 to -0.1623 | -0.1382 | -0.09228 | < 0.001 | 6497 |
| Citric.acid | two numbers | 0.0562 | 0.0562 | 0.03192 to 0.08041 | 0.0369 | 0.02366 | < 0.001 | 6497 |
| Quality | two numbers | 0.03849 | 0.03849 | 0.01418 to 0.06274 | 0.02983 | 0.02368 | 0.00211 | 6497 |

The first 10 rows of 11. The other 1 is in the notebook.

##### 7.11.2 Visualization

The rows of `Sulphates` are not charted in their order: consecutive rows are no more alike than rows picked at random (a correlation of 0.01 between each value and the next), so the order carries no pattern to show.

#### 7.12 Total.sulfur.dioxide

Total.sulfur.dioxide: 6 to 440, median 118; moves with `Free.sulfur.dioxide` most (r 0.721).

##### 7.12.1 Description

**Table 7.12.1 · Total.sulfur.dioxide**

| Statistic | Value |
| --- | --- |
| Type | number |
| Values present | 6497 |
| Distinct values | 276 |
| Continuous | yes |
| Decimal places | 1 |
| Minimum | 6 |
| Maximum | 440 |
| Mean | 115.7 |
| Median | 118 |
| Mode | 111.0 |

The first 10 rows of 17. The other 7 are in the notebook.

###### 7.12.1.1 Correlation

**Table 7.12.1.1 · Correlations**

| Column | Pair of | Association | Pearson's r | 95% CI (Pearson) | Spearman's ρ | Kendall's τ | q-value | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Free.sulfur.dioxide | two numbers | 0.7414 | 0.7209 | 0.709 to 0.7324 | 0.7414 | 0.5595 | < 0.001 | 6497 |
| Residual.sugar | two numbers | 0.4955 | 0.4955 | 0.4769 to 0.5136 | 0.4549 | 0.3054 | < 0.001 | 6497 |
| Volatile.acidity | two numbers | 0.4145 | -0.4145 | -0.4344 to -0.3941 | -0.3435 | -0.2232 | < 0.001 | 6497 |
| Fixed.acidity | two numbers | 0.3291 | -0.3291 | -0.3506 to -0.3072 | -0.2333 | -0.1537 | < 0.001 | 6497 |
| Alcohol | two numbers | 0.309 | -0.2657 | -0.2882 to -0.243 | -0.309 | -0.2063 | < 0.001 | 6497 |
| Chlorides | two numbers | 0.2796 | -0.2796 | -0.3019 to -0.2571 | -0.2684 | -0.1517 | < 0.001 | 6497 |
| Sulphates | two numbers | 0.2757 | -0.2757 | -0.298 to -0.2531 | -0.2567 | -0.1648 | < 0.001 | 6497 |
| pH | two numbers | 0.2427 | -0.2384 | -0.2612 to -0.2153 | -0.2427 | -0.1632 | < 0.001 | 6497 |
| Citric.acid | two numbers | 0.1952 | 0.1952 | 0.1717 to 0.2185 | 0.1594 | 0.1126 | < 0.001 | 6497 |
| Density | two numbers | 0.06154 | 0.0324 | 0.008084 to 0.05667 | 0.06154 | 0.05094 | 0.00902 | 6497 |

The first 10 rows of 11. The other 1 is in the notebook.

##### 7.12.2 Visualization

The rows of `Total.sulfur.dioxide` are not charted in their order: consecutive rows are no more alike than rows picked at random (a correlation of -0.02 between each value and the next), so the order carries no pattern to show.

#### 7.13 Volatile.acidity

Volatile.acidity: 0.08 to 1.58, median 0.29, skewed to high values; moves opposite to `Total.sulfur.dioxide` most (r -0.414).

##### 7.13.1 Description

**Table 7.13.1 · Volatile.acidity**

| Statistic | Value |
| --- | --- |
| Type | number |
| Values present | 6497 |
| Distinct values | 187 |
| Continuous | yes |
| Decimal places | 3 |
| Minimum | 0.08 |
| Maximum | 1.58 |
| Mean | 0.3397 |
| Median | 0.29 |
| Mode | 0.28 |

The first 10 rows of 17. The other 7 are in the notebook.

###### 7.13.1.1 Correlation

**Table 7.13.1.1 · Correlations**

| Column | Pair of | Association | Pearson's r | 95% CI (Pearson) | Spearman's ρ | Kendall's τ | q-value | Rows |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Chlorides | two numbers | 0.4159 | 0.3771 | 0.3561 to 0.3978 | 0.4159 | 0.2818 | < 0.001 | 6497 |
| Total.sulfur.dioxide | two numbers | 0.4145 | -0.4145 | -0.4344 to -0.3941 | -0.3435 | -0.2232 | < 0.001 | 6497 |
| Citric.acid | two numbers | 0.378 | -0.378 | -0.3986 to -0.3569 | -0.2951 | -0.2015 | < 0.001 | 6497 |
| Free.sulfur.dioxide | two numbers | 0.3657 | -0.3526 | -0.3737 to -0.3311 | -0.3657 | -0.248 | < 0.001 | 6497 |
| Density | two numbers | 0.2713 | 0.2713 | 0.2486 to 0.2937 | 0.2614 | 0.1743 | < 0.001 | 6497 |
| Quality | two numbers | 0.2657 | -0.2657 | -0.2882 to -0.243 | -0.2578 | -0.1991 | < 0.001 | 6497 |
| pH | two numbers | 0.2615 | 0.2615 | 0.2387 to 0.284 | 0.1949 | 0.1357 | < 0.001 | 6497 |
| Sulphates | two numbers | 0.255 | 0.226 | 0.2028 to 0.2489 | 0.255 | 0.1734 | < 0.001 | 6497 |
| Fixed.acidity | two numbers | 0.219 | 0.219 | 0.1957 to 0.242 | 0.2003 | 0.1341 | < 0.001 | 6497 |
| Residual.sugar | two numbers | 0.196 | -0.196 | -0.2193 to -0.1725 | -0.06438 | -0.05302 | < 0.001 | 6497 |

The first 10 rows of 11. The other 1 is in the notebook.

##### 7.13.2 Visualization

The rows of `Volatile.acidity` are not charted in their order: consecutive rows are no more alike than rows picked at random (a correlation of -0.03 between each value and the next), so the order carries no pattern to show.

#### 7.14 Duplicate Rows

Across 6,497 rows the table has 2,172 exact-duplicate rows (33% of the table; biggest duplicate group 8 rows): **substantial**. Likely root causes: repeated CSV imports, a missing primary-key deduplication step, or row-level leakage between intended-distinct sources. Deduplicating before training matters; duplicated rows inflate model confidence artificially.

- **Beyond chance z:** 31.46
- **Chance column:** density
- **Chance step:** 1.000e-05
- **Identical pairs:** 1485
- **Largest group size:** 8
- **N exact duplicates:** 2172
- **N exact groups:** 993
- **N rows:** 6497
- **N unique:** 5318
- **Pairs expected by chance:** 0
- **Pct beyond chance:** 33.43
- **Pct exact duplicates:** 33.43
- **Verdict:** Substantial

*How to read this*

> This chapter counts rows that repeat another row exactly, value for value: how many rows take part in a duplicate group, how many groups exist, and how large the largest group is.
> 
> Duplicate rows inflate the apparent row count and can place identical rows on both sides of the training and held-out split, which flatters every quality figure in this report. Only exact repeats are detected here; rows that differ by a rounding digit or a whitespace variant count as distinct.
> 
> Distinct records can also be identical by chance when their values are recorded coarsely, such as age in half years and height to 0.1 cm. When at least 1% of the rows repeat, the chapter compares the identical pairs with the pairs that differ by one step on the most finely recorded numeric column and agree on every other column. Records drawn independently land on neighboring steps about as often as on the same one, so the pairs one step apart give the number of identical pairs that chance produces. Copied rows exceed that number; coincidences do not, and they do not flatter the quality.

#### 7.15 Leakage Suspicion

**Nothing to check.** No column that awaits an answer tracks a target at 0.95 or more, so no column on its own gives a target away.

- **Critical threshold:** 0.999
- **N confirmed:** 0
- **N critical:** 0
- **N suspects:** 0
- **Threshold:** 0.95
- **Verdict:** Clean

*How to read this*

> For every column that is not a target, this chapter reads how closely the column tracks each target, on an association from 0 to 1, and lists any pair at 0.95 or more. For two numeric columns the association is the stronger of Pearson's r and Spearman's rho; when the column or the target is categorical it is the correlation ratio η, or Cramér's V when both are. At 0.999 or more the column reproduces the target: that is what a copy or a rescaled copy of it looks like.
> 
> A listed column poses one question: is its value known before the target's value exists? If it is, the column is a strong input and the quality stated in this report is real. If it was computed from the target or recorded after it, a formula that reads it looks right on these rows and will not hold on new data. The coefficients read the same in both cases; the answer needs someone who knows where the column came from.
> 
> The owner of the analysis can give that answer. A column confirmed as known before the target is listed as confirmed and is no longer a suspect. A column that turns out to be a leak is left out of the model's inputs, and the analysis run again.

#### 7.16 General

Clustering found no clear groups. The best grouping of the 6,497 complete rows over 11 numeric columns is into 2 groups, with a silhouette of 0.283 (on a scale where 1 is fully separate groups and 0 is none), below the 0.50 that clear structure shows, so no Clusters chapter is written.

**Table 7.16 · Groupings tried**

| Groups | Silhouette | Inertia | Kept |
| --- | --- | --- | --- |
| 2 | 0.2827 | 17822.8 | yes |
| 3 | 0.2592 | 16228.6 |  |
| 4 | 0.2469 | 13129.2 |  |
| 5 | 0.1838 | 12341.8 |  |
| 6 | 0.1604 | 11749.2 |  |

- **Inertia:** 56135.3
- **K:** 2
- **N columns used:** 11
- **N rows:** 6497
- **N rows complete:** 6497
- **Silhouette:** 0.2827
- **Verdict:** Weak

*How to read this*

> The General chapter covers what holds across all columns together: descriptive statistics, correlations, missing values and outlier ranges under Description, the Clusters found among the rows, and, when a segment column was chosen, the Segments.

##### 7.16.1 Description

**Table 7.16.1 · Columns**

| Variable | Type | Values present | Distinct values | Continuous | Decimal places |
| --- | --- | --- | --- | --- | --- |
| Chlorides | number | 6497 | 214 | yes | 3 |
| Total.sulfur.dioxide | number | 6497 | 276 | yes | 1 |
| Alcohol | number | 6497 | 111 | yes | 14 |
| Citric.acid | number | 6497 | 89 | yes | 2 |
| Density | number | 6497 | 998 | yes | 6 |
| pH | number | 6497 | 108 | yes | 2 |
| Fixed.acidity | number | 6497 | 106 | yes | 2 |
| Free.sulfur.dioxide | number | 6497 | 135 | yes | 1 |
| Residual.sugar | number | 6497 | 316 | yes | 2 |
| Sulphates | number | 6497 | 111 | yes | 2 |

The first 10 rows of 12. The other 2 are in the notebook.

**Table 7.16.1 · Center**

| Variable | Mean | Median | Mode |
| --- | --- | --- | --- |
| Chlorides | 0.05603 | 0.047 | 0.044 |
| Total.sulfur.dioxide | 115.7 | 118 | 111.0 |
| Alcohol | 10.49 | 10.3 | 9.5 |
| Citric.acid | 0.3186 | 0.31 | 0.3 |
| Density | 0.9947 | 0.9949 | 0.9972 |
| pH | 3.219 | 3.21 | 3.16 |
| Fixed.acidity | 7.215 | 7 | 6.8 |
| Free.sulfur.dioxide | 30.53 | 29 | 29.0 |
| Residual.sugar | 5.443 | 3 | 2.0 |
| Sulphates | 0.5313 | 0.51 | 0.5 |

The first 10 rows of 12. The other 2 are in the notebook.

**Table 7.16.1 · Spread**

| Variable | Minimum | Maximum | Standard deviation | Variance | Interquartile range | Sum |
| --- | --- | --- | --- | --- | --- | --- |
| Chlorides | 0.009 | 0.611 | 0.03503 | 0.001227 | 0.027 | 364.1 |
| Total.sulfur.dioxide | 6 | 440 | 56.52 | 3194.7 | 79 | 751,993 |
| Alcohol | 8 | 14.9 | 1.193 | 1.423 | 1.8 | 68165.2 |
| Citric.acid | 0 | 1.66 | 0.1453 | 0.02112 | 0.14 | 2070.2 |
| Density | 0.9871 | 1.039 | 0.002999 | 8.992e-06 | 0.00465 | 6462.5 |
| pH | 2.72 | 4.01 | 0.1608 | 0.02585 | 0.21 | 20910.6 |
| Fixed.acidity | 3.8 | 15.9 | 1.296 | 1.681 | 1.3 | 46877.9 |
| Free.sulfur.dioxide | 1 | 289 | 17.75 | 315 | 24 | 198,323 |
| Residual.sugar | 0.6 | 65.8 | 4.758 | 22.64 | 6.3 | 35364.7 |
| Sulphates | 0.22 | 2 | 0.1488 | 0.02214 | 0.17 | 3451.7 |

The first 10 rows of 12. The other 2 are in the notebook.

**Table 7.16.1 · Shape**

| Variable | Skewness | Kurtosis | Total sum of squares |
| --- | --- | --- | --- |
| Chlorides | 5.4 | 50.9 | 7.973 |
| Total.sulfur.dioxide | -0.001177 | -0.3717 | 20,752,901 |
| Alcohol | 0.5657 | -0.5317 | 9241 |
| Citric.acid | 0.4717 | 2.397 | 137.2 |
| Density | 0.5036 | 6.606 | 0.05841 |
| pH | 0.3868 | 0.3677 | 167.9 |
| Fixed.acidity | 1.723 | 5.061 | 10918.1 |
| Free.sulfur.dioxide | 1.22 | 7.906 | 2,046,508 |
| Residual.sugar | 1.435 | 4.359 | 147,048 |
| Sulphates | 1.797 | 8.654 | 143.8 |

The first 10 rows of 12. The other 2 are in the notebook.

**Table 7.16.1 · Rows per value**

| Variable | Value | Rows | Share |
| --- | --- | --- | --- |
| Quality | 3 | 30 | 0.4618% |
| Quality | 4 | 216 | 3.325% |
| Quality | 5 | 2138 | 32.91% |
| Quality | 6 | 2836 | 43.65% |
| Quality | 7 | 1079 | 16.61% |
| Quality | 8 | 193 | 2.971% |
| Quality | 9 | 5 | 0.07696% |

*How to read this*

> This chapter summarizes every column at once: the descriptive statistics table below, then Correlation, Missing Values and Outliers. For a numeric column the table reports its center (mean, median, mode), its spread (standard deviation, variance, interquartile range, percentiles) and its shape (skewness, kurtosis); for a categorical column it reports the count and share of each category.

> Each row of the tables describes one column. The statistics are grouped: the column itself, where its values center, how far they spread, what shape their distribution takes, and its percentiles. They read as follows.

**Table 7.16.1 · Description**

| Statistic | Explanation |
| --- | --- |
| Variable | Name of the column the statistics in the row describe |
| Type | Type assigned during data processing (bool, integer, number, decimal, text or date) |
| Values present | Number of rows in which the column holds a value |
| Distinct values | Number of different values the column holds |
| Continuous | Whether the column can take any value in a range, as opposed to a discrete column limited to a fixed set of values |
| Decimal places | Length of the fractional part of the values |
| Mean | Arithmetic average: the sum of all values divided by the number of values |
| Median | The middle value: half of the values lie at or below it and half at or above it. It is also the 50% percentile |
| Mode | The value that appears most often |
| Minimum | Smallest numeric value in the column |

The first 10 rows of 20. The other 10 are in the notebook.

###### 7.16.1.1 Missing Values

No column has a missing value: all 6,497 rows are complete.

- **N columns with missing:** 0
- **N complete rows:** 6497
- **N rows:** 6497
- **Pct complete rows:** 100

*How to read this*

> The table lists, for each column, the count of present values (Values) beside the row count of the processed table (Rows), the number of missing values and their share. The larger the share, the less any statistic or model built on the column can be trusted.
> 
> - **Below 5% missing**: safe to use as it is.
> - **5% to 25% missing**: usable; filling the gaps or excluding those rows is worth considering.
> - **25% or more missing**: the column is flagged and receives its own chapter in the Data section. Verify why so much is missing before trusting any result that depends on it.
> 
> A model is computed only on rows that hold a value in every column it reads, so gaps spread over several columns cost more rows than any one column's share suggests. The last column, Complete rows without, shows for each input with gaps how many rows would be complete if that column were left out; it is blank for a column without gaps, for a target, and for a column no model reads. A column that is the only gap in many rows is the one whose removal keeps the most data.

###### 7.16.1.2 Outliers

12 of 12 numeric columns have values beyond the Tukey fences (1.5 times the interquartile range outside the quartiles). `citric_acid` has the largest share: 7.8% of its values. Whether such values are rare but real rows or recording errors decides whether they are kept.

**Table 7.16.1.2 · Outliers**

| Column | Values | Lower fence | Upper fence | Below | Above | Share |
| --- | --- | --- | --- | --- | --- | --- |
| Alcohol | 6497 | none below | 14.000 | 0 | 3 | 0.05% |
| Chlorides | 6497 | none below | 0.105500 | 0 | 286 | 4.4% |
| Citric.acid | 6497 | 0.04000 | 0.60000 | 279 | 230 | 7.83% |
| Density | 6497 | none below | 1.0040 | 0 | 3 | 0.05% |
| Fixed.acidity | 6497 | 4.450 | 9.650 | 7 | 350 | 5.49% |
| Free.sulfur.dioxide | 6497 | none below | 77 | 0 | 62 | 0.95% |
| pH | 6497 | 2.795 | 3.635 | 7 | 66 | 1.12% |
| Quality | 6497 | 3.500 | 7.500 | 30 | 198 | 3.51% |
| Residual.sugar | 6497 | none below | 17.550 | 0 | 118 | 1.82% |
| Sulphates | 6497 | none below | 0.8550 | 0 | 191 | 2.94% |

The first 10 rows of 12. The other 2 are in the notebook.

- **N columns:** 12
- **N columns assessed:** 12
- **N columns with outliers:** 12
- **Worst column:** citric_acid
- **Worst pct:** 7.83

*How to read this*

> The table counts the outliers of every numeric column by the Tukey rule. Q1 and Q3 are the values below which 25% and 75% of a column's values fall, and the interquartile range is Q3 minus Q1. The lower fence lies 1.5 times the interquartile range below Q1, the upper fence the same distance above Q3; a value beyond a fence is an outlier. For each column the table gives both fences, how many values lie below and above them, their share of the column's values, and the single value that lies furthest beyond its fence. These are the same fences the box plots draw their whiskers to.
> 
> A column is not assessed when it has fewer than four values, or when the middle half of its values sits on a single number: the interquartile range is then zero and the rule would call every other value an outlier.
> 
> Extreme values can be real (rare but legitimate rows) or errors (measurement mistakes, data-entry slips). Which case applies decides whether to keep, clip or drop them before trusting a model that uses the column. A strongly skewed column has many values beyond one fence without any of them being wrong.

###### 7.16.1.3 Correlation

66 column pairs analyzed across 6,497 rows; 62 (93.9%) are unlikely to be chance, after allowing for how many pairs were tested. Any other pair may still show a large association, but one that cannot be told apart from chance on the rows the pair was measured on. An association states that two columns go together, not that one brings the other about.

- **N categorical pairs:** 0
- **N mixed pairs:** 0
- **N numeric pairs:** 66
- **N pairs:** 66
- **N samples:** 6497
- **N significant:** 62

**Table 7.16.1.3 · Pairs · 24 of 66 rows shown**

| Association | 95% CI | Column | Kendall | Kind | N | Other column | Pearson | Q value | Spearman |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 0.7414 | 0.709, 0.7324 | Free.sulfur.dioxide | 0.5595 | numeric | 6497 | Total.sulfur.dioxide | 0.7209 | < 0.001 | 0.7414 |
| 0.6994 | -0.6994, -0.6737 | Alcohol | -0.5215 | numeric | 6497 | Density | -0.6867 | < 0.001 | -0.6994 |
| 0.5907 | 0.3413, 0.3836 | Chlorides | 0.4141 | numeric | 6497 | Density | 0.3626 | < 0.001 | 0.5907 |
| 0.5525 | 0.5354, 0.5692 | Density | 0.3822 | numeric | 6497 | Residual.sugar | 0.5525 | < 0.001 | 0.5267 |
| 0.4955 | 0.4769, 0.5136 | Residual.sugar | 0.3054 | numeric | 6497 | Total.sulfur.dioxide | 0.4955 | < 0.001 | 0.4549 |
| 0.4589 | 0.4395, 0.4779 | Density | 0.3038 | numeric | 6497 | Fixed.acidity | 0.4589 | < 0.001 | 0.4341 |
| 0.4469 | 0.4246, 0.4636 | Alcohol | 0.3524 | numeric | 6497 | Quality | 0.4443 | < 0.001 | 0.4469 |
| 0.4159 | 0.3561, 0.3978 | Chlorides | 0.2818 | numeric | 6497 | Volatile.acidity | 0.3771 | < 0.001 | 0.4159 |
| 0.4145 | -0.4344, -0.3941 | Total.sulfur.dioxide | -0.2232 | numeric | 6497 | Volatile.acidity | -0.4145 | < 0.001 | -0.3435 |
| 0.4029 | 0.3823, 0.423 | Free.sulfur.dioxide | 0.2638 | numeric | 6497 | Residual.sugar | 0.4029 | < 0.001 | 0.3878 |

The first 10 rows of 24. The other 14 are in the notebook.

*How to read this*

> This chapter measures how pairs of columns go together: the Correlation Measures table below, the Strongest Correlations, the Correlation Heatmap and, when the analysis has targets, the Potential Data Leaks. Numeric columns and categorical columns are both paired, a categorical column being one that is not numeric and holds between 2 and 50 distinct values. Every pair is stated as an association from 0 (unrelated) to 1 (one column gives the other away), so pairs of different kinds can be compared. An association states that two columns go together, not that one brings the other about.

> The table lists every pair of columns once, with its kind, its association, the figures of its kind, its q-value and the number of rows the pair was measured on. A pair is measured on the rows where both columns hold a value.

**Table 7.16.1.3 · Correlation**

| Measure | Explanation |
| --- | --- |
| Kind | What the two columns hold: two numbers (numeric), a number and a category (numeric_categorical), or two categories (categorical) |
| Association | Strength of the pair from 0 to 1, whatever its kind. Two numbers: the stronger of Pearson's coefficient and Spearman's ρ, without its sign. A number and a category: the correlation ratio η. Two categories: Cramér's V |
| Covariance | Two numbers only. Direction of the relationship (positive or negative) in the units of the two columns. It is not standardized, so its size says little about strength without further context |
| Pearson's Correlation Coefficient | Two numbers only. Strength and direction of a linear relationship, from -1 (perfect negative) through 0 (no linear relationship) to 1 (perfect positive) |
| Spearman's ρ | Two numbers only. Strength and direction of a monotonic relationship, computed on ranks rather than values. It captures relationships that consistently rise or fall even when they are not linear, and it is less affected by extreme values |
| Kendall's τ | Two numbers only. Strength and direction of a monotonic relationship based on the concordance of ranks between the two columns. More conservative than Spearman's ρ, and steadier on small tables |
| Correlation ratio η | A number and a category. The square root of the share of the number's spread that lies between the categories, from 0 (every category has the same average) to 1 (the category fixes the number). For a category of two values it equals the absolute Pearson coefficient with the category coded 0 and 1. Its square, η², is that share: an η of 0.6 means the categories account for 36% of the spread |
| Cramér's V | Two categories. How far the table of counts of the two columns departs from what unrelated columns would give, from 0 (unrelated) to 1 (each value of one column goes with one value of the other), corrected so that columns with many rare values do not read as related |
| q-value | How likely a pair this strong is among unrelated columns, adjusted for the number of pairs listed (Benjamini-Hochberg false-discovery rate). Among all pairs reported with q below 0.05, about 5% or fewer are expected to be false discoveries. The right measure for ranking many pairs |
| 95% CI (Pearson) | Two numbers only. Lower and upper bounds of the 95% confidence interval on the Pearson coefficient, via the Fisher z-transform, on the rows the pair was measured on. A narrow interval means the coefficient is well estimated; a wide interval that straddles zero means the relationship is uncertain |

The first 10 rows of 12. The other 2 are in the notebook.

###### 7.16.1.3.1 Strongest Correlations

The 20 pairs of columns with the smallest q-values: the associations that remain significant after the Benjamini-Hochberg adjustment for the number of pairs tested. Among all pairs reported with q below 0.05, about 5% or fewer are expected to be false discoveries; a pair above 0.05 may be coincidence even when its association looks strong.

A pair with an association above 0.9 often signals a duplicate or derived column. Moderately strong pairs with a low q-value are the relationships most worth investigating.

Each listed pair is drawn below, the picture behind the figure. Two numbers are drawn as a scatter, one point per row, the quickest way to see whether a strong value rests on a trend or on a few rows far from the rest. A number and a category are drawn as the number's box plot per category. Two categories are drawn as a heat map of how many rows hold each combination of values.

###### 7.16.1.3.3 Potential Data Leaks

The table lists the association between every column and each target, whatever the two hold, with its q-value. An association close to 1 with a target, together with a q-value near zero, is one of two things: a strong input, or a data leak, a column derived from the target after the fact, such as a tax amount computed from the price being predicted. A leaked column trains a model that looks perfect and fails on new data, because the leak is not available at prediction time.

The Leakage Suspicion chapter in the Data section lists the pairs at 0.95 or more and marks those at 0.999 or more, where a column reproduces the target. For two numbers the association is whichever of Pearson's r and Spearman's rho is the stronger, because a column derived from the target often follows a curve rather than a line: the log of a price tracks the price perfectly, and Pearson alone reads that as weaker than it is. For a number and a category it is the correlation ratio η, and for two categories Cramér's V. Whether a listed column is a strong input or a leak depends on whether it is known before the target exists, which the owner of the analysis can confirm.

#### 7.17 Findings

1 finding from the data profile (1 Critical) is listed in the Concerns chapter at the top of the analysis.

