mvpa2.datasets.sources.skl_data.skl_wine¶
-
mvpa2.datasets.sources.skl_data.
skl_wine
(return_X_y=False)¶ Load and return the wine dataset (classification).
New in version 0.18.
The wine dataset is a classic and very easy multi-class classification dataset.
Classes 3 Samples per class [59,71,48] Samples total 178 Dimensionality 13 Features real, positive Read more in the User Guide.
Parameters: return_X_y : boolean, default=False.
If True, returns
(data, target)
instead of a Bunch object. See below for more information about thedata
andtarget
object.Returns: data : Bunch
Dictionary-like object, the interesting attributes are: ‘data’, the data to learn, ‘target’, the classification labels, ‘target_names’, the meaning of the labels, ‘feature_names’, the meaning of the features, and ‘DESCR’, the full description of the dataset.
(data, target) : tuple if
return_X_y
is TrueThe copy of UCI ML Wine Data Set dataset is
downloaded and modified to fit standard format from:
https://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.data
Notes
This function has been auto-generated by wrapping load_wine() from the sklearn package. The documentation of this function has been kept verbatim. Consequently, the actual return value is not as described in the documentation, but the data is returned as a PyMVPA dataset.
Examples
Let’s say you are interested in the samples 10, 80, and 140, and want to know their class name.
>>> from sklearn.datasets import load_wine >>> data = load_wine() >>> data.target[[10, 80, 140]] array([0, 1, 2]) >>> list(data.target_names) ['class_0', 'class_1', 'class_2']