This project implements flower classification using the famous Iris dataset.
It explores different machine learning approaches and includes a trained Support Vector Machine (SVM) model for prediction.
flower-classification/
├── Iris Classification - DataFlair.ipynb # Reference notebook
├── Iris Classification - DataFlair.py # Python script
├── main.ipynb # Main project notebook
├── iris.data # Iris dataset (features)
├── iris.names # Dataset description
├── SVM.pickle # Pre-trained SVM model
├── main.pdf # Project report
├── requirements.txt # Dependencies
└── README.md # Project documentation
- Dataset: Iris Dataset
- Classes:
- Iris Setosa
- Iris Versicolour
- Iris Virginica
- Features:
- Sepal length
- Sepal width
- Petal length
- Petal width
Clone the repository and install dependencies:
git clone https://github.com/your-username/flower-classification.git
cd flower-classification
pip install -r requirements.txtOpen the main Jupyter notebook:
jupyter notebook main.ipynbYou can also execute the script directly:
python "Iris Classification - DataFlair.py"The SVM.pickle file contains a trained model:
import pickle
with open("SVM.pickle", "rb") as f:
model = pickle.load(f)
sample = [[5.1, 3.5, 1.4, 0.2]] # Example input
prediction = model.predict(sample)
print("Predicted class:", prediction)- Model: Support Vector Machine (SVM)
- Accuracy: ~97% on test data (Iris dataset)
- Iris Dataset - UCI ML Repository
- DataFlair tutorial on Iris Classification
Feel free to open issues or submit pull requests if you’d like to improve this project.
This project is licensed under the MIT License.
