IRIS FLOWER CLASSIFICATION Group members: M Ahmad Imran Raja Muhammad Ahmad Sohaib Ahmed 1. Introduction Iris Flower Classification is one of the most popular beginner projects in Machine Learning. It is used to classify iris flowers into different species based on their physical measurements. The dataset was introduced by the British statistician Ronald Fisher in 1936. Today, it is commonly available in machine learning libraries like Scikit-learn This project helps beginners understand: Supervised Learning Classification problems Model training and testing Accuracy evaluation 2. Problem Statement The goal of this project is: To classify iris flowers into one of three species using machine learning algorithms. The three species are: 1. Iris setosa 2. Iris versicolor 3. Iris virginica We will build a classification model that predicts the species based on flower measurements. 3. Dataset Information We will use the Iris dataset from Scikit-learn. Dataset Features (Input Variables) Each flower has 4 features: 1. Sepal Length (cm) 2. Sepal Width (cm) 3. Petal Length (cm) 4. Petal Width (cm) Target Variable (Output) Species of the flower (Setosa, Versicolor, Virginica) Dataset Size Total Samples: 150 50 samples per species No missing values Balanced dataset (equal samples per class) This makes it perfect for beginners. 4. Type of Machine Learning This project uses: β
Supervised Learning Because: We have labeled data (species name is given). β
Classification Because: The output is a category (flower type), not a number. 5. Model Selection Since you are a beginner, we will use: π Logistic Regression Why Logistic Regression? Easy to understand Works well for classification Fast and simple Great for beginners Other models that can also be used: K-Nearest Neighbors (KNN) Decision Tree Support Vector Machine (SVM) But for this documentation, we use Logistic Regression 6. Project Workflow Here is the complete step-by-step process: Step 1: Import Libraries We import: NumPy Pandas Matplotlib (for visualization) Scikit-learn Step 2: Load Dataset Load the Iris dataset from sklearn. Step 3: Explore the Data Check first few rows Check shape of dataset Check class distribution Step 4: Split the Data Split into: Training Data (80%) Testing Data (20%) Training data β used to train model Testing data β used to test model accuracy Step 5: Train the Model Use Logistic Regression to train on training data. Step 6: Make Predictions Predict species using test data. Step 7: Evaluate Model Check: Accuracy Score Confusion Matrix Classification Report 7. Model Evaluation Accuracy Accuracy = (Correct Predictions / Total Predictions) Γ 100 For Iris dataset, Logistic Regression usually gives: β
95% to 100% accuracy Confusion Matrix Shows: True Positives True Negatives False Positives False Negatives Classification Report Shows: Precision Recall F1-score Support 8. Why This Project is Important This project helps beginners understand: How classification works How to train a machine learning model How to test model performance Real-world ML workflow Data preprocessing basics It is often the first ML project for students. 9. Applications in Real Life Although Iris dataset is academic, classification is used in: Medical diagnosis Email spam detection Face recognition Fraud detection Product recommendation 10. Advantages of Logistic Regression Simple and easy Works well with small datasets Fast training Interpretable results 11. Limitations Not ideal for very complex datasets Assumes linear relationship Less powerful than advanced models like Random Forest or Neural Networks 12. Tools and Technologies Used Programming Language: Python Library: Scikit-learn IDE: Jupyter Notebook / VS Code / Google Colab 13. Expected Output After training the model: Input: Sepal Length = 5.1 Sepal Width = 3.5 Petal Length = 1.4 Petal Width = 0.2 Output: Predicted Species: Iris Setosa 14. Conclusion In this project, we: Used the Iris dataset Applied Logistic Regression Trained and tested the model Evaluated accuracy Successfully classified iris flowers The Iris Flower Classification project is a simple and powerful way to start learning Machine Learning.