9.19.1.4. sklearn.datasets.load_iris¶
- sklearn.datasets.load_iris()¶
Load and return the iris dataset (classification).
Examples
Let’s say you are interested in the samples 10, 25, and 50, and want to know their class name.
>>> from sklearn.datasets import load_iris >>> data = load_iris() >>> data.target[[10, 25, 50]] array([0, 0, 1]) >>> list(data.target_names) ['setosa', 'versicolor', 'virginica']