Skip to content

Shreyanshg11/CodeAlpha_IrIsClassification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeAlpha_IrIsClassification

Machine Learning project to classify Iris flowers using Random Forest Classifier with EDA, visualization and feature importance analysis.

Iris Flower Classification using Machine Learning 🌸

Project Overview

This project uses Machine Learning to classify Iris flowers into three species:

  • 🌺 Iris Setosa
  • 🌼 Iris Versicolor
  • 🌸 Iris Virginica

The model predicts flower species based on sepal and petal measurements.

Dataset Information

The dataset contains 150 flower samples with the following features:

  • Sepal Length
  • Sepal Width
  • Petal Length
  • Petal Width

Target Variable: Species

Technologies Used

  • Python
  • Pandas
  • NumPy
  • Matplotlib
  • Seaborn
  • Scikit-Learn

Project Workflow

  1. Data Loading
  2. Data Exploration
  3. Data Visualization
  4. Data Preprocessing
  5. Train-Test Split
  6. Model Training
  7. Model Evaluation
  8. Feature Importance Analysis
  9. New Sample Prediction

Machine Learning Model

Algorithm: Random Forest Classifier

Parameters:

  • n_estimators = 100
  • random_state = 42

Results

  • Model Accuracy: 90%
  • Classification Report Generated
  • Confusion Matrix Visualized
  • Feature Importance Analysis Completed

Key Insights

  • Petal Length and Petal Width are the most important features
  • The dataset is balanced with 50 samples per species
  • Random Forest classified Iris-Setosa with 100% confidence
  • Clear separation visible between species in pairplot visualizations

How to Run

  1. Clone this repository
  2. Install required libraries:
pip install pandas numpy matplotlib seaborn scikit-learn
  1. Open the notebook in Jupyter:
jupyter notebook iris_classification.ipynb
  1. Run all cells sequentially

Author

Shreyansh Gupta B.Tech (CSDS) Galgotias College of Engineering & Technology

About

Machine Learning project to classify Iris flowers using Random Forest Classifier with EDA, visualization and feature importance analysis.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages