Wine Quality#
Physicochemical measurements of 6497 red and white vinho verde wines from the north of Portugal, together with the quality of each wine as a score given by wine tasters. Red and white wines are stored together and the colour of the wine is not part of the data. The scores are ordered and unbalanced, so the dataset suits regression as well as ordinal or multiclass classification.
Overview#
Loader |
|
Task |
Regression |
Samples |
6497 |
Features |
11 |
Targets |
1 continuous target, |
Missing values |
None |
License |
CC BY 4.0 |
Features#
fixed_acidity, volatile_acidity, citric_acid, residual_sugar, chlorides,
free_sulfur_dioxide, total_sulfur_dioxide, density, pH, sulphates and
alcohol. The values are in the units of the original UCI release.
Target#
y holds the quality score of each wine as a float64 with whole-number values. For
classification, convert it with data.y.astype(int). About three quarters of the wines
have a score of 5 or 6, and only 5 wines have the highest score, 9. The data is stored as
released by UCI, so repeated rows are kept.
Source and citation#
Source: UCI Machine Learning Repository
Obtained from: UCI Machine Learning Repository, dataset 186, downloaded with the ucimlrepo package. The ucimlrepo version is recorded in the file.
Creators: Paulo Cortez, A. Cerdeira, F. Almeida, T. Matos, J. Reis
Please cite the dataset as:
Cortez, P., Cerdeira, A., Almeida, F., Matos, T., & Reis, J. (2009). Wine Quality [Dataset]. UCI Machine Learning Repository. https://doi.org/10.24432/C56S3T
See also:
Cortez, P., Cerdeira, A., Almeida, F., Matos, T., & Reis, J. (2009). Modeling wine preferences by data mining from physicochemical properties. Decision Support Systems, 47(4), 547-553.
License#
CC BY 4.0, as stated by the source. The license was checked at the source on 2026-10-17. See License and citation.
Changes made#
Converted to the NumPy NPZ format. Features and the quality score are stored as float64.
The red wines (1599) and the white wines (4898) are stored together. As in the UCI release, the colour of the wine is not a feature.
Example#
>>> from pyml_datasets import load_wine_quality
>>> data = load_wine_quality()
>>> data.X.shape
(6497, 11)
>>> float(data.y.min()), float(data.y.max())
(3.0, 9.0)