This project explores the Iris dataset through exploratory data analysis (Task 1) and applies a K-Nearest Neighbors (KNN) classifier (Task 2) to classify flowers into their species.
- Loaded and cleaned the dataset
- Visualized distributions of features
- Observed relationships between sepal/petal dimensions and species
- Preprocessed data (train/test split + scaling)
- Trained KNN models with different
k
values (3, 5, 7, 9) - Evaluated performance using accuracy, confusion matrix, and classification report
- Python π
- pandas, numpy
- scikit-learn
- matplotlib, seaborn
git clone https://github.com/yourusername/Iris-KNN-Classification.git
cd Iris-KNN-Classification
pip install -r requirements.txt
jupyter notebook iris_knn.ipynb
- Scaling is crucial for distance-based models like KNN
- The choice of
k
directly impacts model accuracy - Visualization helps in understanding feature separability
β¨ Author: Diya Agarwal