Catalog / Tabular
Iris (1936)
150 flowers, 4 measurements each, 3 species.
Why it matters
Probably the most-used dataset in statistics teaching. Fisher used it to introduce linear discriminant analysis, and it still shows up in the first chapter of countless ML courses: small enough to print on one page, and one class (setosa) is perfectly separable while the other two overlap.
Get the data
# pip install -U huggingface_hub
hf download scikit-learn/iris --repo-type dataset \
--local-dir irisfrom datasets import load_dataset # pip install datasets
ds = load_dataset("scikit-learn/iris")
print(ds)import polars as pl
df = pl.read_parquet("hf://datasets/scikit-learn/iris@~parquet/default/train/*.parquet")
print(df.shape)- Year
- 1936
- Creators
- Ronald A. Fisher (data collected by Edgar Anderson)
- Task
- Multiclass classification (flower species)
- Size
- 150 rows × 4 features
- Splits
- all 150
- Input
- Sepal length/width and petal length/width, in cm
- Labels
- Iris setosa, versicolor, virginica (50 each)
- License
- CC BY 4.0 (UCI repository)
- Paper
- The Use of Multiple Measurements in Taxonomic Problems · on this site
Samples
| Id | SepalLengthCm | SepalWidthCm | PetalLengthCm | PetalWidthCm | Species |
|---|---|---|---|---|---|
| 17 | 5.4 | 3.9 | 1.3 | 0.4 | Iris-setosa |
| 61 | 5 | 2 | 3.5 | 1 | Iris-versicolor |
| 34 | 5.5 | 4.2 | 1.4 | 0.2 | Iris-setosa |
| 122 | 5.6 | 2.8 | 4.9 | 2 | Iris-virginica |
| 140 | 6.9 | 3.1 | 5.4 | 2.1 | Iris-virginica |
| 149 | 6.2 | 3.4 | 5.4 | 2.3 | Iris-virginica |
| 60 | 5.2 | 2.7 | 3.9 | 1.4 | Iris-versicolor |
| 142 | 6.9 | 3.1 | 5.1 | 2.3 | Iris-virginica |
| 67 | 5.6 | 3 | 4.5 | 1.5 | Iris-versicolor |
| 121 | 6.9 | 3.2 | 5.7 | 2.3 | Iris-virginica |
| 4 | 4.6 | 3.1 | 1.5 | 0.2 | Iris-setosa |
| 95 | 5.6 | 2.7 | 4.2 | 1.3 | Iris-versicolor |
∅ = missing value
What one record actually looks like (raw JSON, row 16)
{
"Id": 17,
"PetalLengthCm": 1.3,
"PetalWidthCm": 0.4,
"SepalLengthCm": 5.4,
"SepalWidthCm": 3.9,
"Species": "Iris-setosa"
}Media fields point at a local copy; on Hugging Face they are bytes in a Parquet file.
Sampled 2026-11-07 from scikit-learn/iris at revision 0bda0ce
The whole dataset at once
Worth knowing
- Plot petal length against petal width and setosa splits off cleanly; versicolor and virginica overlap a little. That plot is the whole lesson.
- The widely copied UCI version differs from Fisher's paper in two rows (samples 35 and 38), noted by Bezdek et al. in 1999.
- Fisher published it in the Annals of Eugenics, which is why some courses now prefer the Palmer Penguins dataset (2020) as a replacement.
Related datasets
- Palmer Penguins: 2020, a popular modern substituteHugging Face ↗Palmer Penguins on this site →