{"id":28255099,"url":"https://github.com/arnabushna24/codealpha_iris_flower_classification","last_synced_at":"2025-06-16T06:31:47.610Z","repository":{"id":293852976,"uuid":"985316155","full_name":"ArnabUshna24/Iris_Flower_Classifier","owner":"ArnabUshna24","description":"Classification of Iris Flowers","archived":false,"fork":false,"pushed_at":"2025-05-20T04:36:35.000Z","size":549,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-08T21:44:41.510Z","etag":null,"topics":["flower-classification","machine-learning","python3"],"latest_commit_sha":null,"homepage":"https://www.kaggle.com/datasets/saurabh00007/iriscsv","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/ArnabUshna24.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-05-17T14:04:07.000Z","updated_at":"2025-05-21T04:34:50.000Z","dependencies_parsed_at":"2025-05-17T15:21:14.899Z","dependency_job_id":"91b87e8b-06b4-40f1-9f59-a182b55b2ace","html_url":"https://github.com/ArnabUshna24/Iris_Flower_Classifier","commit_stats":null,"previous_names":["arnabushna24/codealpha_iris_flower_classification"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ArnabUshna24/Iris_Flower_Classifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnabUshna24%2FIris_Flower_Classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnabUshna24%2FIris_Flower_Classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnabUshna24%2FIris_Flower_Classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnabUshna24%2FIris_Flower_Classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArnabUshna24","download_url":"https://codeload.github.com/ArnabUshna24/Iris_Flower_Classifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnabUshna24%2FIris_Flower_Classifier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260114449,"owners_count":22960909,"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","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":["flower-classification","machine-learning","python3"],"created_at":"2025-05-19T20:17:05.693Z","updated_at":"2025-06-16T06:31:47.573Z","avatar_url":"https://github.com/ArnabUshna24.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iris Flower Classifier\n\n\n## Overview\nIris flower has three (3) species - Setosa, Versicolor, and Virginica. They differ according to their measurements, i.e., sepal length, sepal width, petal length, and petal width. The goal of this project is to classify a sample Iris flower from the provided measurements according to the species by training an ML model that can learn from the given dataset and do the classification.\n\n## Data Extraction\nThis dataset is available on [Kaggle](https://www.kaggle.com/datasets/saurabh00007/iriscsv), which consists of 150 Iris flower measurement data. It has 6 columns - `Id`, `SepalLengthCm`, `SepalWidthCm`, `PetalLengthCm`, `PetalWidthCm`, and\t`Species`. After importing all the necessary libraries, Google Drive was mounted to access the dataset. As there were no missing values, data preprocessing was not required.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cimg src=\"https://github.com/ArnabUshna24/CodeAlpha_Iris_Flower_Classification/blob/main/data_visualizations/distribution_iris_species.png\" alt=\"Iris Species\" width=\"400\"/\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cimg src=\"https://github.com/ArnabUshna24/CodeAlpha_Iris_Flower_Classification/blob/main/data_visualizations/distribution_iris_features.png\" alt=\"Iris Features\" width=\"500\"/\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e Fig. 1: Distribution of Iris species \u003c/td\u003e\n    \u003ctd align=\"left\"\u003e Fig. 2: Distribution of Iris features \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Feature and Target Preparation\nAfter importing `LabelEncoder` from `sklearn.preprocessing` package, `Species` column was encoded into numeric labels. Other columns (except `Id`) were selected as feature columns. After that, data was split into training (80%) and testing (20%) categories. Also, the features were scaled.\n\n## Model Training and Evaluation\nFor this project, `RandomForestClassifier` was used.\n\n\u003cp\u003e\u003cstrong\u003eTable 1:\u003c/strong\u003e Class-wise Performance Metrics \u003c/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"5\"\u003e\n  \u003ctr\u003e\n    \u003cth align=\"left\"\u003e Species \u003c/th\u003e\n    \u003cth align=\"center\"\u003e Precision \u003c/th\u003e\n    \u003cth align=\"center\"\u003e Recall \u003c/th\u003e\n    \u003cth align=\"center\"\u003e F1-score \u003c/th\u003e\n    \u003cth align=\"center\"\u003e Support \u003c/th\u003e\n    \u003cth align=\"center\"\u003e Interpretation \u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e Iris-setosa \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 1.00 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 1.00 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 1.00 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 10 \u003c/td\u003e\n    \u003ctd align=\"left\"\u003e All the samples are correctly predicted. \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e Iris-versicolor \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.82 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.90 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.86 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 10 \u003c/td\u003e\n    \u003ctd align=\"left\"\u003e Most predicted as versicolor are correct (82%). Of all versicolor samples, 90% were correctly identified. \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e Iris-virginica \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.89 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.80 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.84 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 10 \u003c/td\u003e\n    \u003ctd align=\"left\"\u003e Most predicted as virginica are correct (89%). Of all virginica samples, 80% were correctly identified. \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\u003cp\u003e\u003cstrong\u003eTable 2:\u003c/strong\u003e Overall Model Performance Metrics \u003c/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"5\"\u003e\n  \u003ctr\u003e\n    \u003cth align=\"left\"\u003e Metric \u003c/th\u003e\n    \u003cth align=\"center\"\u003e Precision \u003c/th\u003e\n    \u003cth align=\"center\"\u003e Recall \u003c/th\u003e\n    \u003cth align=\"center\"\u003e F1-score \u003c/th\u003e\n    \u003cth align=\"center\"\u003e Support \u003c/th\u003e\n    \u003cth align=\"center\"\u003e Interpretation \u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e Accuracy \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e - \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e - \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.90 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 30 \u003c/td\u003e\n    \u003ctd align=\"left\"\u003e Overall, 90% of all predictions were correct. \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e Macro Average \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.90 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.90 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.90 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 30 \u003c/td\u003e\n    \u003ctd align=\"left\"\u003e Simple (unweighted) average of metrics across all classes, which treats all classes equally regardless of their support. \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e Weighted Average \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.90 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.90 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 0.90 \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e 30 \u003c/td\u003e\n    \u003ctd align=\"left\"\u003e Average of metrics weighted by the number of true samples per class. \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cimg src=\"https://github.com/ArnabUshna24/CodeAlpha_Iris_Flower_Classification/blob/main/performance_metrics_visualizations/confusion_matrix.png\" alt=\"Confusion Matrix\" width=\"400\"/\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cimg src=\"https://github.com/ArnabUshna24/CodeAlpha_Iris_Flower_Classification/blob/main/performance_metrics_visualizations/feature_importance.png\" alt=\"Feature Importance\" width=\"500\"/\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cimg src=\"https://github.com/ArnabUshna24/CodeAlpha_Iris_Flower_Classification/blob/main/performance_metrics_visualizations/scatter_plot_petalFeatures.png\" alt=\"Class Cluster for Petal Features\" width=\"400\"/\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"left\"\u003e Fig. 1: Confusion matrix \u003c/td\u003e\n    \u003ctd align=\"left\"\u003e Fig. 2: Feature importance from Random Forest (RF) \u003c/td\u003e\n    \u003ctd align=\"left\"\u003e Fig. 3: Class cluster for petal features \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\nIf you have any queries, contact me: arnabnushna24@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnabushna24%2Fcodealpha_iris_flower_classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnabushna24%2Fcodealpha_iris_flower_classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnabushna24%2Fcodealpha_iris_flower_classification/lists"}