A basic machine learning classification project developed in Python as part of DecodeLabs Artificial Intelligence Project 2.
This project demonstrates a basic supervised learning workflow using the Iris dataset.
A Decision Tree Classifier is trained to recognize patterns in the dataset and classify Iris flowers into their respective species.
- Load and understand a small dataset
- Prepare the data for machine learning
- Split the dataset into training and testing sets
- Apply a classification algorithm
- Train a machine learning model
- Make predictions on test data
- Evaluate the model using accuracy and a classification report
- Python
- Pandas
- Scikit-learn
- Decision Tree Classifier
The project uses the built-in Iris dataset provided by Scikit-learn.
The dataset contains four features:
- Sepal length
- Sepal width
- Petal length
- Petal width
The model classifies flowers into three species:
- Setosa
- Versicolor
- Virginica
Iris Dataset
↓
Data Preparation
↓
Train/Test Split
↓
Decision Tree Classifier
↓
Model Training
↓
Prediction
↓
Model Evaluation
The Decision Tree Classifier achieved an accuracy of:
1.00 (100%)
on the 20% test dataset for the selected train/test split.
The classification report evaluates the model using:
- Precision
- Recall
- F1-score
- Support
Here is the Data Classification AI model running in the terminal:
pip install pandas scikit-learnpython classification.py