Iris flower data set


The Iris flower data set or Fisher's Iris data set is a multivariate data set introduced by the British statistician, eugenicist, and biologist Ronald Fisher in his 1936 paper The use of multiple measurements in taxonomic problems as an example of linear discriminant analysis. It is sometimes called Anderson's Iris data set because Edgar Anderson collected the data to quantify the morphologic variation of Iris flowers of three related species. Two of the three species were collected in the Gaspé Peninsula "all from the same pasture, and picked on the same day and measured at the same time by the same person with the same apparatus". Fisher's paper was published in the journal, the Annals of Eugenics, creating controversy about the continued use of the Iris dataset for teaching statistical techniques today.
The data set consists of 50 samples from each of three species of Iris. Four features were measured from each sample: the length and the width of the sepals and petals, in centimeters. Based on the combination of these four features, Fisher developed a linear discriminant model to distinguish the species from each other.

Use of the data set

Based on Fisher's linear discriminant model, this data set became a typical test case for many statistical classification techniques in machine learning such as support vector machines.
The use of this data set in cluster analysis however is not common, since the data set only contains two clusters with rather obvious separation. One of the clusters contains Iris setosa, while the other cluster contains both Iris virginica and Iris versicolor and is not separable without the species information Fisher used. This makes the data set a good example to explain the difference between supervised and unsupervised techniques in data mining: Fisher's linear discriminant model can only be obtained when the object species are known: class labels and clusters are not necessarily the same.
Nevertheless, all three species of Iris are separable in the projection on the nonlinear and branching principal component. The data set is approximated by the closest tree with some penalty for the excessive number of nodes, bending and stretching. Then the so-called "metro map" is constructed. The data points are projected into the closest node. For each node the pie diagram of the projected points is prepared. The area of the pie is proportional to the number of the projected points. It is clear from the diagram that the absolute majority of the samples of the different Iris species belong to the different nodes. Only a small fraction of Iris-virginica is mixed with Iris-versicolor. Therefore, the three species of Iris are separable by the unsupervising procedures of nonlinear principal component analysis. To discriminate them, it is sufficient just to select the corresponding nodes on the principal tree.

Data set

The dataset contains a set of 150 records under five attributes - sepal length, sepal width, petal length, petal width and species.

Dataset OrderSepal lengthSepal widthPetal lengthPetal widthSpecies
15.13.51.40.2I. setosa
24.93.01.40.2I. setosa
34.73.21.30.2I. setosa
44.63.11.50.2I. setosa
55.03.61.40.3I. setosa
65.43.91.70.4I. setosa
74.63.41.40.3I. setosa
85.03.41.50.2I. setosa
94.42.91.40.2I. setosa
104.93.11.50.1I. setosa
115.43.71.50.2I. setosa
124.83.41.60.2I. setosa
134.83.01.40.1I. setosa
144.33.01.10.1I. setosa
155.84.01.20.2I. setosa
165.74.41.50.4I. setosa
175.43.91.30.4I. setosa
185.13.51.40.3I. setosa
195.73.81.70.3I. setosa
205.13.81.50.3I. setosa
215.43.41.70.2I. setosa
225.13.71.50.4I. setosa
234.63.61.00.2I. setosa
245.13.31.70.5I. setosa
254.83.41.90.2I. setosa
265.03.01.60.2I. setosa
275.03.41.60.4I. setosa
285.23.51.50.2I. setosa
295.23.41.40.2I. setosa
304.73.21.60.2I. setosa
314.83.11.60.2I. setosa
325.43.41.50.4I. setosa
335.24.11.50.1I. setosa
345.54.21.40.2I. setosa
354.93.11.50.2I. setosa
365.03.21.20.2I. setosa
375.53.51.30.2I. setosa
384.93.61.40.1I. setosa
394.43.01.30.2I. setosa
405.13.41.50.2I. setosa
415.03.51.30.3I. setosa
424.52.31.30.3I. setosa
434.43.21.30.2I. setosa
445.03.51.60.6I. setosa
455.13.81.90.4I. setosa
464.83.01.40.3I. setosa
475.13.81.60.2I. setosa
484.63.21.40.2I. setosa
495.33.71.50.2I. setosa
505.03.31.40.2I. setosa
517.03.24.71.4I. versicolor
526.43.24.51.5I. versicolor
536.93.14.91.5I. versicolor
545.52.34.01.3I. versicolor
556.52.84.61.5I. versicolor
565.72.84.51.3I. versicolor
576.33.34.71.6I. versicolor
584.92.43.31.0I. versicolor
596.62.94.61.3I. versicolor
605.22.73.91.4I. versicolor
615.02.03.51.0I. versicolor
625.93.04.21.5I. versicolor
636.02.24.01.0I. versicolor
646.12.94.71.4I. versicolor
655.62.93.61.3I. versicolor
666.73.14.41.4I. versicolor
675.63.04.51.5I. versicolor
685.82.74.11.0I. versicolor
696.22.24.51.5I. versicolor
705.62.53.91.1I. versicolor
715.93.24.81.8I. versicolor
726.12.84.01.3I. versicolor
736.32.54.91.5I. versicolor
746.12.84.71.2I. versicolor
756.42.94.31.3I. versicolor
766.63.04.41.4I. versicolor
776.82.84.81.4I. versicolor
786.73.05.01.7I. versicolor
796.02.94.51.5I. versicolor
805.72.63.51.0I. versicolor
815.52.43.81.1I. versicolor
825.52.43.71.0I. versicolor
835.82.73.91.2I. versicolor
846.02.75.11.6I. versicolor
855.43.04.51.5I. versicolor
866.03.44.51.6I. versicolor
876.73.14.71.5I. versicolor
886.32.34.41.3I. versicolor
895.63.04.11.3I. versicolor
905.52.54.01.3I. versicolor
915.52.64.41.2I. versicolor
926.13.04.61.4I. versicolor
935.82.64.01.2I. versicolor
945.02.33.31.0I. versicolor
955.62.74.21.3I. versicolor
965.73.04.21.2I. versicolor
975.72.94.21.3I. versicolor
986.22.94.31.3I. versicolor
995.12.53.01.1I. versicolor
1005.72.84.11.3I. versicolor
1016.33.36.02.5I. virginica
1025.82.75.11.9I. virginica
1037.13.05.92.1I. virginica
1046.32.95.61.8I. virginica
1056.53.05.82.2I. virginica
1067.63.06.62.1I. virginica
1074.92.54.51.7I. virginica
1087.32.96.31.8I. virginica
1096.72.55.81.8I. virginica
1107.23.66.12.5I. virginica
1116.53.25.12.0I. virginica
1126.42.75.31.9I. virginica
1136.83.05.52.1I. virginica
1145.72.55.02.0I. virginica
1155.82.85.12.4I. virginica
1166.43.25.32.3I. virginica
1176.53.05.51.8I. virginica
1187.73.86.72.2I. virginica
1197.72.66.92.3I. virginica
1206.02.25.01.5I. virginica
1216.93.25.72.3I. virginica
1225.62.84.92.0I. virginica
1237.72.86.72.0I. virginica
1246.32.74.91.8I. virginica
1256.73.35.72.1I. virginica
1267.23.26.01.8I. virginica
1276.22.84.81.8I. virginica
1286.13.04.91.8I. virginica
1296.42.85.62.1I. virginica
1307.23.05.81.6I. virginica
1317.42.86.11.9I. virginica
1327.93.86.42.0I. virginica
1336.42.85.62.2I. virginica
1346.32.85.11.5I. virginica
1356.12.65.61.4I. virginica
1367.73.06.12.3I. virginica
1376.33.45.62.4I. virginica
1386.43.15.51.8I. virginica
1396.03.04.81.8I. virginica
1406.93.15.42.1I. virginica
1416.73.15.62.4I. virginica
1426.93.15.12.3I. virginica
1435.82.75.11.9I. virginica
1446.83.25.92.3I. virginica
1456.73.35.72.5I. virginica
1466.73.05.22.3I. virginica
1476.32.55.01.9I. virginica
1486.53.05.22.0I. virginica
1496.23.45.42.3I. virginica
1505.93.05.11.8I. virginica

The iris data set is widely used as a beginner's dataset for machine learning purposes. The dataset is included in R base and Python in the machine learning package Scikit-learn, so that users can access it without having to find a source for it.

The following R (programming language)">R">R (programming language) code illustrates usage.


iris
class
  1. "data.frame"
iris3
class
  1. "array"

The following Python">Python (programming language)">Python code illustrates usage.


from sklearn.datasets import load_iris
iris = load_iris
iris

This code gives: