This project explores the Iris dataset to analyze its features and implement machine learning models to classify the species of Iris flowers.
The Iris dataset is a classic dataset for classification problems. This project includes:
- Data preprocessing and cleaning.
- Exploratory Data Analysis (EDA) using visualizations like histograms, scatter plots, and pair plots.
- Building and evaluating machine learning models (Logistic Regression, K-Nearest Neighbors, and Decision Tree).
- Visualizing model performance through metrics like accuracy, confusion matrix, and classification reports.
- Load and clean the Iris dataset.
- Visualize data distributions and correlations.
- Preprocess data for machine learning.
- Implement multiple machine learning models.
- Evaluate and compare model performances.
- Test new data for predictions.
- Python 3.15
- Libraries:
The Iris dataset contains 150 samples with 4 features:
- Sepal Length (cm)
- Sepal Width (cm)
- Petal Length (cm)
- Petal Width (cm)
- Species: Target variable with three classes:
- Iris-setosa
- Iris-versicolor
- Iris-virginica
The implemented models achieve the following approximate accuracies:
Logistic Regression: ~97%
KNN: ~96%
Decision Tree: ~96%
The confusion matrix and classification report provide further insights into model performance.

