task_categories:tabular-classification size_categories:n<1K license:cc0-1.0 region:us
---
license: cc0-1.0
size_categories:
- n<1K
task_categories:
- tabular-classification
dataset_info:
  features:
  - name: petal_length
    dtype: float32
  - name: petal_width
    dtype: float32
  - name: sepal_length
    dtype: float32
  - name: sepal_width
    dtype: float32
  - name: species
    dtype:
      class_label:
        names:
          '0': Iris-setosa
          '1': Iris-versicolor
          '2': Iris-virginica
  splits:
  - name: train
    num_bytes: 3600
    num_examples: 150
  download_size: 3835
  dataset_size: 3600
configs:
- config_name: default
  data_files: data/train-*
---

# Note

The Iris dataset is one of the most popular datasets used for demonstrating simple classification models. This dataset was copied and transformed from `scikit-learn/iris` to be more native to huggingface.

Some changes were made to the dataset to save the user from extra lines of data transformation code, notably:
- removed `id` column
- `species` column is casted to ClassLabel (supports `ClassLabel.int2str()` and `ClassLabel.str2int()`)
- cast feature columns from `float64` down to `float32`
- rename feature names to snake-case

## Iris Species Dataset

The Iris dataset was used in R.A. Fisher's classic 1936 paper, The Use of Multiple Measurements in Taxonomic Problems, and can also be found on the UCI Machine Learning Repository.

It includes three iris species with 50 samples each as well as some properties about each flower. One flower species is linearly separable from the other two, but the other two are not linearly separable from each other.
The dataset is taken from [UCI Machine Learning Repository's Kaggle](https://www.kaggle.com/datasets/uciml/iris).
The following description is taken from UCI Machine Learning Repository. 
This is perhaps the best known database to be found in the pattern recognition literature. Fisher's paper is a classic in the field and is referenced frequently to this day. (See Duda & Hart, for example.) The data set contains 3 classes of 50 instances each, where each class refers to a type of iris plant. One class is linearly separable from the other 2; the latter are NOT linearly separable from each other.

Predicted attribute: class of iris plant.

This is an exceedingly simple domain.

This data differs from the data presented in Fishers article (identified by Steve Chadwick, spchadwick '@' espeedaz.net ). The 35th sample should be: 4.9,3.1,1.5,0.2,"Iris-setosa" where the error is in the fourth feature. The 38th sample: 4.9,3.6,1.4,0.1,"Iris-setosa" where the errors are in the second and third features.


Features in this dataset are the following:

- sepal length in cm 
- sepal width in cm
- petal length in cm
- petal width in cm
- class:
  - Iris-setosa
  - Iris-versicolour
  - Iris-virginica