Skip to content

PasamTharun/iris_Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

🌸 Iris Classification

This project showcases machine learning techniques to classify the Iris dataset. We utilize both a Random Forest Classifier and a Neural Network to predict the species of iris flowers based on their features.

🚀Getting Started

Dependencies: Ensure you have the following libraries installed to run the code:
      ->numpy
      ->pandas
      ->scikit-learn
      ->matplotlib
      ->seaborn
      ->tensorflow

You can install these libraries using pip:
   pip install numpy pandas scikit-learn matplotlib seaborn tensorflow

📊Data Loading and Preparation

Load the Iris dataset: Use scikit-learn’s load_iris function.
Create a DataFrame: Convert the data into a pandas DataFrame for easy manipulation.
Split the data: Separate features from target labels.
Encode target labels: Convert labels into numerical format using LabelEncoder.
Train-Test Split: Divide the data into training and testing sets (80-20 ratio).

🌲Random Forest Classifier

Initialize and Train:-Train a Random Forest Classifier with 100 estimators on the training data.
Evaluate the Model:-Assess the model’s performance using accuracy, classification report, and confusion matrix.

📈Visualize Results:

Create visualizations for accuracy, classification report, and confusion matrix using matplotlib and seaborn.

🎯Classification Report:

image

Confusion Matrix:

image

🤖Neural Network

Normalize Features:-Apply StandardScaler to normalize the data.
Build and Train:-Construct and train a neural network with one hidden layer.
Evaluate the Model:-Measure the model’s accuracy on the test set.
Results
Accuracy:-100%
Accuracy Plot Of Neural Networks:

image

🔍 Correlation Matrix:-

Visualize feature relationships with the correlation matrix.

image

🏆Conclusion

This project demonstrates the effectiveness of both the Random Forest Classifier and Neural Network in classifying the Iris dataset. Both models achieve high accuracy, supported by detailed metrics and visualizations.


Author-Pasam Tharun

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published