Skip to content

Iris Flower Classification using k-nearest neighbor Machine Learning algorithm. This Project was made in fulfillment with the Skills Union Data Science and AI Certification.

Notifications You must be signed in to change notification settings

NoorNick/Iris-Flower-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌸 Iris Flower Classification with K-Nearest Neighbors (KNN)

This repository contains a complete example of classifying Iris flowers using the K-Nearest Neighbors (KNN) algorithm with scikit-learn. It includes data preprocessing, model training, prediction on new samples, and data visualization using PCA.


πŸš€ Features

  • Loads the famous Iris dataset
  • Splits data into training and testing sets
  • Scales features using StandardScaler for better KNN performance
  • Trains a KNN classifier with Euclidean distance
  • Evaluates model accuracy and prints detailed classification report
  • Predicts classes of new flower samples
  • Visualizes the dataset in 2D using Principal Component Analysis (PCA)

πŸ› οΈ How to Run

  1. Clone the repository:
git clone https://https://github.com/NoorNick/Iris-Flower-Classification.git
cd Iris-Flower-Classification

2.Install dependencies:

pip install -r requirements.txt
  1. Run the notebook or script:

If you use Jupyter Notebook:

jupyter notebook

Then open Iris_flower_classification.ipynb and run the cells.


πŸ“Š Output Example

The notebook/script prints model accuracy, classification reports, predicted classes for new flowers, and shows a PCA scatter plot of the data.

Happy Flower Classifying! 🌷🌼🌻

About

Iris Flower Classification using k-nearest neighbor Machine Learning algorithm. This Project was made in fulfillment with the Skills Union Data Science and AI Certification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published