Skip to content

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Species Segmentation with Clustering: A Case Study on the Limitations

The Iris flower dataset, also known as Fisher's Iris dataset, is a classic multivariate dataset made famous by British statistician and biologist Ronald Fisher in his 1936 paper The Use of Multiple Measurements. It consists of 150 samples of iris flowers across three speciesβ€”Iris setosa, Iris versicolor, and Iris virginicaβ€”with four measured features: sepal length, sepal width, petal length, and petal width.

Although widely used in supervised learning tasks, the dataset is rarely used for clustering (unsupervised learning) due to a specific biological limitation:

  • One species (Iris setosa) is linearly separable from the other two.
  • The remaining two species (versicolor and virginica) have overlapping feature distributions that make them indistinguishable without species labels.

This project uses K-means clustering to explore the dataset from an unsupervised learning perspective. It demonstrates:

  • How feature selection and scaling affect clustering results
  • How the Elbow Method can guide (but not guarantee) cluster selection
  • Why cluster labels β‰  class labels and the importance of domain knowledge in interpreting unsupervised results

The conclusion of the project reflects on the limitations of K-means clustering for biological datasets and draws comparision with what supervised models like logistic regression can offer when labels are known.

Clustering Solution Using Sepal Features

Clustering Solution Using Sepal Features

πŸ“ Project Structure

iris_species_k_means_clustering_case_study/
β”œβ”€β”€ dataset/
β”‚   └── iris-dataset.csv
β”œβ”€β”€ notebook/
β”‚   └── iris_species_segmentation.ipynb
β”œβ”€β”€ visuals/
β”œβ”€β”€ README.md

Key Takeaways:

  • The Elbow Method is useful, but not always definitive (e.g. suggests 2 or 5 clusters instead of the known 3 iris species).
  • Clustering on petal features better reflects the known biological categories.
  • This demonstrates a key limitation of k-means: clusters do not always map to real-world classes.

Clustering Solution Using Sepal Features

Next Steps:

  • Use logistic regression or classification using the known species labels for making predictions.

Β© 2025 All rights are reserved.

About

This project explores the application of unsupervised learning, specifically K-means clustering, to the classic Iris dataset to investigate whether iris species can be segmented based on petal and sepal measurements.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages