Skip to content

This project demonstrates how to use a Decision Tree Classifier from the scikit-learn library to classify the Iris flower dataset — one of the most famous datasets in machine learning.

Notifications You must be signed in to change notification settings

mohamedelsamin/Decision-Tree-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Decision-Tree-Model

This project demonstrates how to use a Decision Tree Classifier from the scikit-learn library to classify the Iris flower dataset — one of the most famous datasets in machine learning.

###What the Code Does:### 1.Loads the dataset from scikit-learn.

2.Splits it into training and testing sets (80/20).

3.Trains a Decision Tree Classifier on the training data.

4.Predicts flower classes for the test data.

5.Evaluates the model's accuracy using accuracy_score.

6.Displays the predicted and actual labels, along with accuracy.

###How the model works:### Is petal length < 2.5? ├── Yes → Predict: Setosa └── No ├── Is petal width < 1.8? │ ├── Yes → Predict: Versicolor │ └── No → Predict: Virginica

About

This project demonstrates how to use a Decision Tree Classifier from the scikit-learn library to classify the Iris flower dataset — one of the most famous datasets in machine learning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published