Interactive machine learning app built with Streamlit and scikit-learn.
Train, compare, and visualize ML models directly in your browser — no backend server required.
🚀 Live Demo: ml-playground-visura.streamlit.app
Training and comparing multiple machine learning models usually requires writing repetitive boilerplate code. The Streamlit ML Playground is a zero-code, interactive web application that allows users to instantly benchmark regression, classification, and clustering algorithms on any tabular dataset. It is designed for rapid prototyping, educational purposes, and quick data exploration.
- Frontend: Streamlit (Multi-page app architecture)
- Backend/ML: Python, Scikit-learn, Pandas, NumPy
- Visualization: Plotly / Matplotlib / Seaborn
pip install -r requirements.txt
streamlit run app.pyThe app opens at http://localhost:8501
- Upload your own CSV or load a built-in sample dataset
- Instant data preview — row count, column types, missing values
- Three sample datasets ready to use: House Prices, Loan Approval, Clustering
- Trains 5 models in one click: Linear, Scaled Linear, Polynomial, Ridge, Lasso
- MSE comparison bar chart with best model highlighted
- Actual vs Predicted scatter plot
- Plain-English interpretation of scaling, polynomial, and regularization results
- Models: Logistic Regression, Decision Tree (tunable depth), Random Forest
- Metrics: Accuracy, Precision, Recall, F1 Score
- Confusion matrix heatmaps for each model
- Train vs Test accuracy comparison — overfitting detection built in
- KMeans: Adjustable k, cluster distribution chart, 2D scatter by cluster
- PCA: Configurable components, explained variance chart, PC1 vs PC2 scatter
- All numeric features used automatically — no configuration needed
| Dataset | Rows | Features | Best For |
|---|---|---|---|
| 🏠 House Prices | 50 | 6 numeric | Regression |
| 💳 Loan Approval | 50 | 6 numeric, binary target | Classification |
| 🔵 Clustering | 50 | 4 numeric | KMeans / PCA |
streamlit_app/
├── app.py # Home page
├── requirements.txt # Dependencies
├── pages/
│ ├── 1_Upload.py # Upload & preview
│ ├── 2_Regression.py # Regression models
│ ├── 3_Classification.py # Classification models
│ └── 4_Unsupervised.py # KMeans & PCA
└── utils/
├── api_client.py # ML service layer (direct scikit-learn calls)
└── sample_data.py # Sample dataset loader
CSV upload failed — make sure the file is .csv format with numeric columns. Try a sample dataset first to confirm the app is working.
Classification target error — choose a column with a small number of unique values (binary or categorical). Continuous numeric columns won't work well as classification targets.
Clustering needs numeric data — if your dataset has only text columns, the unsupervised page will flag it.
👤 Connect with Me Built by Visura Rodrigo




