Skip to main content

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.

learner app

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 airfoil dataset is bundled as frontend/data/airfoil.csv because Pyodide can't reach fetch_openml from inside the browser.
  • Boston-housing uses the synthetic generator (real Boston was removed from sklearn โ‰ฅ1.2).

License

BSD

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scikit_learner-0.1.1.tar.gz (42.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scikit_learner-0.1.1-py3-none-any.whl (44.9 kB view details)

Uploaded Python 3

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

Hashes for scikit_learner-0.1.1.tar.gz
Algorithm Hash digest
SHA256 38fa9b43e97917340c5b11730fdc6eaeb067b22eb8765bdd884b5f32f8188088
MD5 c9bce8033074cc71943e7559e25812fa
BLAKE2b-256 e5d16023b221479d2ba7611bb5d3f932ac76f9c25209e024edbd63b342b808b4

See more details on using hashes here.

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

Hashes for scikit_learner-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af510022f074d2344716280368a17f1e7f17ac1d691b2779ab9c267b55aceecd
MD5 6181098d87bb165287b7404afe71ec6e
BLAKE2b-256 bb1c34067e3e7c5a1cf2f29c7044ba0c6d1a7872159e02cc4049d94566e28105

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page