{"id":31579161,"url":"https://github.com/njorogepaul-moghul/iris-flower-classification","last_synced_at":"2026-04-29T16:33:14.923Z","repository":{"id":317375011,"uuid":"1067123282","full_name":"njorogepaul-moghul/Iris-Flower-Classification","owner":"njorogepaul-moghul","description":" This project predicts the species of an Iris flower (Setosa, Versicolor, Virginica) based on its sepal and petal measurements.  We trained and evaluated multiple ML models  — with Logistic Regression performing best at 93% accuracy.  Finally, we deployed on streamlit:[app] (https://irisflowerapp-ripwlmfmctrzqphjapj97t.streamlit.app/)","archived":false,"fork":false,"pushed_at":"2025-09-30T13:23:50.000Z","size":473,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-30T14:46:29.563Z","etag":null,"topics":["iris-classification","jupyter-notebook","logistic-regression","machine-learning","python","random-forest-classifier","scikit-learn"],"latest_commit_sha":null,"homepage":"https://github.com/njorogepaul-moghul/Titanic-survival-prediction.git","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/njorogepaul-moghul.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-30T12:12:16.000Z","updated_at":"2025-09-30T13:23:53.000Z","dependencies_parsed_at":"2025-09-30T14:46:32.295Z","dependency_job_id":null,"html_url":"https://github.com/njorogepaul-moghul/Iris-Flower-Classification","commit_stats":null,"previous_names":["njorogepaul-moghul/iris-flower-classification"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/njorogepaul-moghul/Iris-Flower-Classification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njorogepaul-moghul%2FIris-Flower-Classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njorogepaul-moghul%2FIris-Flower-Classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njorogepaul-moghul%2FIris-Flower-Classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njorogepaul-moghul%2FIris-Flower-Classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/njorogepaul-moghul","download_url":"https://codeload.github.com/njorogepaul-moghul/Iris-Flower-Classification/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njorogepaul-moghul%2FIris-Flower-Classification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278518125,"owners_count":26000176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["iris-classification","jupyter-notebook","logistic-regression","machine-learning","python","random-forest-classifier","scikit-learn"],"created_at":"2025-10-05T20:47:39.244Z","updated_at":"2025-10-05T20:47:43.053Z","avatar_url":"https://github.com/njorogepaul-moghul.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌸 Iris Flower Classification Project\r\n\r\n## 📌 Project Overview\r\nThis project aims to classify **Iris flower species** (*Setosa, Versicolor, Virginica*) based on their sepal and petal measurements.  \r\nWe explored the dataset, engineered new features, trained multiple models, evaluated performance, and finally prepared the models for deployment.\r\n\r\n\r\n\r\n## 📂 Dataset\r\n- **Source:** Iris dataset (Fisher’s dataset)\r\n- **Features:**\r\n  - SepalLengthCm\r\n  - SepalWidthCm\r\n  - PetalLengthCm\r\n  - PetalWidthCm\r\n\r\n- **Target:** Species (Setosa, Versicolor, Virginica)\r\n\r\n\r\n\r\n## 🔬 Feature Engineering\r\nWe created additional features to improve predictive power:\r\n- `Petal ratio = PetalLengthCm / PetalWidthCm`\r\n- `Sepal ratio = SepalLengthCm / SepalWidthCm`\r\n- `Petal area = PetalLengthCm * PetalWidthCm`\r\n- `Sepal area = SepalLengthCm * SepalWidthCm`\r\n- `Petal_Sepal_length_Aspect ratio = PetalLengthCm / SepalLengthCm`\r\n- `Compactness = (SepalWidthCm + PetalWidthCm) / (SepalLengthCm + PetalLengthCm)`\r\n\r\n\r\n\r\n## ⚙️ Models Trained\r\nWe trained and tested the following models:\r\n1. Logistic Regression\r\n2. Decision Tree\r\n3. Random Forest\r\n4. Support Vector Machine (SVM)\r\n5. Gradient Boosting Classifier\r\n\r\n\r\n\r\n## 📊 Model Performance\r\n| Model                | Accuracy | Precision | Recall | F1-score |\r\n|-----------------------|----------|-----------|--------|----------|\r\n| Logistic Regression   | 0.93     | 0.93      | 0.93   | 0.93     |\r\n| Decision Tree         | 0.88     | 0.88      | 0.88   | 0.88     |\r\n| Random Forest         | 0.91     | 0.91      | 0.91   | 0.91     |\r\n| Support Vector Machine| 0.91     | 0.91      | 0.91   | 0.91     |\r\n| Gradient Boosting     | 0.88     | 0.88      | 0.88   | 0.88     |\r\n\r\n✅ **Logistic Regression performed best with 93% accuracy**.\r\n\r\n\r\n\r\n## 🔎 Insights\r\n- Strong positive correlations were found between:\r\n  - `PetalLengthCm` and `PetalWidthCm`\r\n  - `PetalLengthCm` and `SepalLengthCm`\r\n  - `PetalWidthCm` and `SepalLengthCm`\r\n- Feature ranges:\r\n  - Sepal Length: 4.0 – 8.0 cm\r\n  - Sepal Width: 2.0 – 4.5 cm\r\n  - Petal Length: 1.0 – 7.0 cm\r\n  - Petal Width: 0.1 – 2.5 cm\r\n\r\n\r\n\r\n## ✅ Conclusion\r\n- We successfully trained ML models to predict Iris flower species.  \r\n- Logistic Regression was the best performer.  \r\n- Our models are now ready for **deployment**.  \r\n\r\n\r\n## 🚀 Next Steps\r\n- Deploy the best models (Logistic Regression, Random Forest, SVM) in a **Streamlit web app**.  \r\n- Provide a user-friendly interface where users can input sepal \u0026 petal dimensions to predict species.\r\n\r\n- [** click here to launch Iris flower app**](https://irisflowerapp-ripwlmfmctrzqphjapj97t.streamlit.app/)\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjorogepaul-moghul%2Firis-flower-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnjorogepaul-moghul%2Firis-flower-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjorogepaul-moghul%2Firis-flower-classification/lists"}