Production-ready Machine Learning App built with KNN, deployed on Streamlit
🚀 Real-time Predictions • 📊 Model Insights • ⚙️ Interactive Tuning
🔗 Live Demo • ⚙️ Setup • 📊 Performance
✅ End-to-end ML pipeline (Data → Model → Deployment) ✅ Clean IPO Architecture (Input → Process → Output) ✅ Real-time predictions with probability confidence ✅ Proper evaluation using F1 Score (not just accuracy) ✅ Interactive UI for model tuning (K selection) ✅ Deployed and accessible globally
👉 https://irisclassifier-project.streamlit.app/
✔ No installation required ✔ Works on mobile & desktop
This project demonstrates how to build a production-ready machine learning application from scratch.
- 150 samples
- 3 classes
- 4 numerical features
| Species | Setosa | Versicolor | Virginica |
|---|---|---|---|
| Emoji | 🌷 | 🌼 | 🌺 |
-
Input flower measurements
-
Get:
- 🎯 Predicted class
- 📊 Probability distribution
- 🔥 Confidence score
- Confusion Matrix
- F1 Score (per class)
- Classification report
- Adjust K (1–20)
- Visualize performance curves
| K Range | Behavior |
|---|---|
| 1–2 | |
| 5 | ✅ Optimal |
| 15+ |
- Raw data view
- Feature distributions
- Scatter plots
| Metric | Score |
|---|---|
| Accuracy | ~96% |
| F1 Score (Macro) | ~96% |
[[10 0 0]
[ 0 10 0]
[ 0 1 9]]
INPUT
- Load dataset
- Train/test split (80/20)
- Feature scaling (StandardScaler)
PROCESS
- KNN (K=5)
- Euclidean distance
- Majority voting
OUTPUT
- Predictions
- Metrics (Accuracy, F1)
- Confusion Matrix
| Category | Tools |
|---|---|
| Frontend | Streamlit |
| ML | Scikit-learn |
| Data | Pandas, NumPy |
| Visualization | Matplotlib, Seaborn |
| Deployment | Streamlit Cloud |
git clone https://github.com/yourusername/iris-classifier.git
cd iris-classifier
python -m venv venv
source venv/bin/activate # Mac/Linux
# venv\Scripts\activate # Windows
pip install -r requirements.txt
streamlit run app.pypython classifier.pyiris-classifier/
├── app.py
├── classifier.py
├── requirements.txt
└── .streamlit/
- Data preprocessing & scaling
- KNN (distance-based learning)
- Model evaluation (F1 Score)
- Confusion matrix interpretation
- Hyperparameter tuning (K selection)
- Probability-based predictions
Deployed on Streamlit Cloud
- Push to GitHub
- Go to https://share.streamlit.io
- Select repo
- Deploy
✅ Auto redeploy on push
Egwuatu Chibuike Dominion AI Engineer
💡 This project reflects my ability to build real-world AI applications — not just models, but complete user-facing systems.
⭐ Star this repo if you found it valuable!
