Train ML models without leaving your browser ๐
Project description
Scikit-Learner ๐
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.
Features
- 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
How it works
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 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.
Running locally
This is a 100% static site โ no Python virtualenv, no Node toolchain, no backend to start. Any static file server will do; the snippet below uses Python's stdlib server only because it's universally available.
python3 -m http.server -d frontend 8080
open http://localhost:8080/
Edit any file under frontend/ and 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.
Deploy
Upload frontend/ to any static host (Netlify, GitHub Pages, S3, โฆ).
Testing
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.
Caveats (WASM)
- 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).
License
BSD
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scikit_learner-0.1.1.tar.gz.
File metadata
- Download URL: scikit_learner-0.1.1.tar.gz
- Upload date:
- Size: 42.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38fa9b43e97917340c5b11730fdc6eaeb067b22eb8765bdd884b5f32f8188088
|
|
| MD5 |
c9bce8033074cc71943e7559e25812fa
|
|
| BLAKE2b-256 |
e5d16023b221479d2ba7611bb5d3f932ac76f9c25209e024edbd63b342b808b4
|
File details
Details for the file scikit_learner-0.1.1-py3-none-any.whl.
File metadata
- Download URL: scikit_learner-0.1.1-py3-none-any.whl
- Upload date:
- Size: 44.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af510022f074d2344716280368a17f1e7f17ac1d691b2779ab9c267b55aceecd
|
|
| MD5 |
6181098d87bb165287b7404afe71ec6e
|
|
| BLAKE2b-256 |
bb1c34067e3e7c5a1cf2f29c7044ba0c6d1a7872159e02cc4049d94566e28105
|