Iris Flower Classification with Decision Trees Web App

Objective:

To build a web application that can accurately classify Iris flower species based on their sepal and petal characteristics using a Decision Tree machine learning algorithm.

Dataset: The Iris flower dataset, which contains 150 samples of Iris flowers, each with measurements for sepal length, sepal width, petal length, and petal width. The dataset is labeled with the species of each flower: Iris setosa, Iris versicolor, and Iris virginica.

Methodology:

  1. Data Preprocessing: Load the dataset and split it into training and testing sets. Perform feature scaling to normalize the data.
  2. Decision Tree Model Building: Train a decision tree model on the training data using scikit-learn library. Tune the hyperparameters of the model to obtain the best performance.
  3. Web App Development: Use Flask web framework to create a web app that allows users to input the sepal and petal measurements of an Iris flower and displays the predicted species using the trained decision tree model.
  4. Model Interpretation: Interpret the decision tree to gain insights into which features are most important in classifying the Iris flower species.

Tools and Technologies:

  1. Python
  2. scikit-learn
  3. Flask
  4. HTML
  5. CSS
  6. pandas
  7. numpy
  8. matplotlib.

Conclusion:

Decision Trees are a simple yet powerful machine learning algorithm for classification tasks. In this project, we have built a decision tree model to classify Iris flower species with high accuracy and developed a web application that allows users to interactively predict the species of an Iris flower based on its sepal and petal measurements. The web app can be used for real-world applications such as plant identification, environmental monitoring, and plant breeding.

Technology Used in the project :-

  1. We have developed this project using the below technology
  2. HTML : Page layout has been designed in HTML
  3. CSS : CSS has been used for all the desigining part
  4. JavaScript : All the validation task and animations has been developed by JavaScript
  5. Python : All the business logic has been implemented in Python
  6. Flask: Project has been developed over the Flask Framework

Supported Operating System :-

  1. We can configure this project on following operating system.
  2. Windows : This project can easily be configured on windows operating system. For running this project on Windows system, you will have to install
  3. Python 3.6.10, PIP, Django.
  4. Linux : We can run this project also on all versions of Linux operating systemMac : We can also easily configured this project on Mac operating system.

Installation Step : -

  1. python 3.6.8
  2. command 1 - python -m pip install --user -r requirements.txt
  3. command 2 - python app.py

Download