A classifier using the kmeans algorithm, using Iris data set:
"Iris data set consists of 150 samples from each of three species of Iris (Iris setosa, Iris
virginica and Iris versicolor). 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.
The vector class, instead of containing the names of each class has been replaced by the
numbers 0, 1 and 2, which correspond to Iris setosa, Iris versicolor and Iris virginica
classes respectively.
The patterns matrix size is 4x150, and the vector corresponding classes is 1x150."
I use K-Means algorithm to classify the data as follows:
- With two features
- Three features
- All features
And graphically display the classification and it error.