Model Training and testing using IRIS dataset.
This project implements and compares three different machine learning approaches (SVM, CNN, and Vision Transformer) for classifying Iris flower species. The project includes data preprocessing, model training, evaluation, and comprehensive performance analysis.
The project aims to:
- Implement three different classification models (SVM, CNN, and ViT)
- Compare their performance metrics (accuracy, training time, inference time)
- Visualize and analyze the results
- Organize the processed data into appropriate folder structures
project/
│
├── dataset/
│ ├── setosa/
│ ├── versicolor/
│ └── virginica/
│
├── models/
│ ├── SVM_model/
│ ├── VT_model/
│ └── CNN_model/
│
├── evaluation/
│ ├── svm_evaluation_metrics.xlsx
│ ├── cnn_evaluation_metrics.xlsx
│ └── vit_evaluation_metrics.xlsx
│
└── visualizations/
├── training_history.png
└── confusion_matrix.png
- Python 3.8+
- PyTorch
- TensorFlow
- scikit-learn
- transformers
- pandas
- numpy
- matplotlib
- seaborn
pip install -r requirements.txt- Data Preparation:
python data_preprocessing.py- Model Training:
python train_svm.py
python train_cnn.py
python train_vit.py- Evaluation:
python evaluate_models.py- SVM: ~96%
- CNN: ~97%
- Vision Transformer: ~88%
- SVM: Fastest
- CNN: Moderate
- Vision Transformer: Slowest
- SVM: Fast
- CNN: Moderate
- Vision Transformer: Slowest
The project includes various visualizations:
- Confusion matrices
- Training history plots
- Performance comparison charts
- Classification report metrics
- Fork the repository
- Create a new branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Iris dataset from UCI Machine Learning Repository
- Vision Transformer implementation based on the huggingface transformers library
- scikit-learn for SVM implementation