A web-based machine learning application for training and comparing regression and classification models. This runs scikit-learn directly in the user's browser via Pyodide, so the whole app deploys as a static website.
- 27 Regression Models across 6 categories
- 22 Classification Models across 6 categories
- Interactive Plotly visualizations β scatter, residuals, predicted vs actual, ROC, confusion matrix, comparison bar chart
- Cross-Validation (3 / 5 / 10 folds)
- Sample Datasets β Iris, Wine, Breast Cancer, Digits (classification); Diabetes, Boston-synthetic, Airfoil, Synthetic (regression)
- Model Export β joblib bytes, single-file or zipped bundle
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Browser β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β index.html + Bootstrap + Plotly β β
β β β pyCall('train', [...]) β β
β β ββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β β β pyodide-bridge.js β β β
β β β β’ loads Pyodide from JSDelivr CDN β β β
β β β β’ installs scikit-learn / pandas / numpy / β β β
β β β scipy / joblib β β β
β β β β’ runs frontend/py/learner.py inside Pyodide β β β
β β β β’ thin pyCall / pyCallBinary wrappers β β β
β β ββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
(no network calls after first load)
First load: ~10 s (downloads Pyodide runtime + sklearn wheel, ~15 MB total). Subsequent loads: ~1 s thanks to browser cache.
Any static host works. Example with Python's stdlib server:
python3 -m http.server -d frontend 8080
open http://localhost:8080/No backend to start. Edit any file under frontend/, reload the browser.
If you change frontend/py/learner.py, the browser fetches it fresh on reload β but Pyodide doesn't pick up the change until the module is re-imported. Hard-reload (Cmd-Shift-R / Ctrl-F5) or open a new tab.
A Playwright end-to-end spec covers Pyodide bootstrap, sample loading, training, predictions, export, and the UI scatter-plot render β 8 assertions, runs against either a local python -m http.server -d frontend or the public URL.
- Pyodide initial load adds ~10 s and ~15 MB of one-time download. Loading overlay covers it.
- CSV upload capped at 20 MB (Pyodide's WASM heap).
- The
airfoildataset is bundled asfrontend/data/airfoil.csvbecause Pyodide can't reachfetch_openmlfrom inside the browser. - Boston-housing uses the synthetic generator (real Boston was removed from sklearn β₯1.2).
BSD
