{"id":26120570,"url":"https://github.com/gunjangyl/iris-detection","last_synced_at":"2026-04-15T13:33:37.833Z","repository":{"id":281535897,"uuid":"934957224","full_name":"gunjangyl/Iris-Detection","owner":"gunjangyl","description":"The Iris Detection Project classifies different species of Iris flowers using machine learning techniques. It analyzes four key features—sepal length, sepal width, petal length, and petal width—to predict one of three classes: Setosa, Versicolor, or Virginica. The project uses algorithms like KNN, Decision Trees, or SVM for classification. Model pe","archived":false,"fork":false,"pushed_at":"2025-07-08T16:24:36.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-08T17:36:01.876Z","etag":null,"topics":["knn-classification","matplotlib","python","scikit-learn","seaborn"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gunjangyl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-18T17:12:12.000Z","updated_at":"2025-07-08T16:24:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"cf88c09c-b254-4a42-b3dd-e14ad5405eee","html_url":"https://github.com/gunjangyl/Iris-Detection","commit_stats":null,"previous_names":["gunjangyl/iris-detection"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gunjangyl/Iris-Detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunjangyl%2FIris-Detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunjangyl%2FIris-Detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunjangyl%2FIris-Detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunjangyl%2FIris-Detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gunjangyl","download_url":"https://codeload.github.com/gunjangyl/Iris-Detection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunjangyl%2FIris-Detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31842938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T13:28:40.153Z","status":"ssl_error","status_checked_at":"2026-04-15T13:28:29.396Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["knn-classification","matplotlib","python","scikit-learn","seaborn"],"created_at":"2025-03-10T13:43:11.631Z","updated_at":"2026-04-15T13:33:37.827Z","avatar_url":"https://github.com/gunjangyl.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iris-Detection\n\n# KNN Iris Implementation  \n\n## Overview  \nThis project implements the **K-Nearest Neighbors (KNN)** algorithm to classify **Iris flower species** using the well-known **Iris dataset**. The KNN algorithm is a simple yet powerful supervised learning technique that classifies a new data point based on its nearest neighbors in feature space.  \n\nThe goal of this project is to demonstrate how KNN can be used for **multiclass classification** and to evaluate its performance on the Iris dataset.  \n\n---\n\n## Dataset 📊  \nThe **Iris dataset** consists of **150 samples**, each representing an Iris flower with **four features**:  \n- **Sepal Length** (cm)  \n- **Sepal Width** (cm)  \n- **Petal Length** (cm)  \n- **Petal Width** (cm)  \n\nEach sample belongs to one of the three classes:  \n- **0** - Iris Setosa 🌿  \n- **1** - Iris Versicolor 🌺  \n- **2** - Iris Virginica 🌸  \n\n---\n\n## Project Workflow 🚀  \n\n### 1️⃣ Data Preprocessing  \n- Load the dataset using `sklearn.datasets`.  \n- Perform **exploratory data analysis (EDA)** using **matplotlib** and **seaborn**.  \n- Split the dataset into **training (80%)** and **testing (20%)** sets.  \n- Normalize/scale the features (optional).  \n\n### 2️⃣ Implementing KNN Algorithm  \n- Choose an optimal value for **K** (using **cross-validation**).  \n- Compute distances between the test sample and all training samples.  \n- Assign the most frequent class among the **K** nearest neighbors.  \n\n### 3️⃣ Model Training \u0026 Evaluation  \n- Train the **KNN classifier** using `sklearn.neighbors.KNeighborsClassifier`.  \n- Evaluate model performance using:  \n  - **Accuracy Score**  \n  - **Confusion Matrix**  \n  - **Classification Report**  \n- Visualize decision boundaries and feature distributions.  \n\n---\n\n## Technologies Used 🛠  \n- **Programming Language**: Python 🐍  \n- **Libraries**:  \n  - `numpy`, `pandas` - Data handling  \n  - `matplotlib`, `seaborn` - Data visualization  \n  - `sklearn` - Machine learning (KNN classifier, train-test split, evaluation metrics)  \n\n---\n\n## Installation \u0026 Usage 🔧  \n\n### 1️⃣ Clone the Repository  \n\ngit clone https://github.com/gunjangyl/KNN-Iris-Implementation.git\ncd KNN-Iris-Implementation\u003cbr\u003e\n2️⃣ Install Dependencies\nbash\nCopy\nEdit\npip install -r requirements.txt \u003cbr\u003e\n3️⃣ Run the Script\nbash\nCopy\nEdit\npython knn_iris.py\nResults \u0026 Observations 📈\nThe KNN classifier achieves high accuracy on the test dataset.\nThe optimal value of K is selected based on model evaluation.\nVisualizations help understand decision boundaries and how different species are classified.\u003cbr\u003e\nExample Confusion Matrix:\n\n\n\nPredicted vs Actual\n--------------------\n[[50  0  0]  \n [ 0 48  2]  \n [ 0  1 49]]\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunjangyl%2Firis-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgunjangyl%2Firis-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunjangyl%2Firis-detection/lists"}