Skip to content

Shareable experiment URL (encode dataset + models + config) #4

Description

@jeanclawd

Problem

There is no way to share or reproduce a specific experiment. "I trained Ridge, SVR-RBF and Gradient Boosting on Airfoil with 10-fold CV and Ridge won" today requires a screenshot or a verbal walkthrough.

Proposal

Encode the experiment state in the URL so a peer can open the link and land on the same setup:

```
https://scikit-learner.app/?dataset=airfoil&target=scaled_sound&features=freq,angle,velocity&models=ridge,svr_rbf,gb&cv=10
```

When the page loads with these params:

  1. Auto-load the dataset.
  2. Pre-select target and features.
  3. Pre-select the model checkboxes.
  4. (Optional) Auto-train on load if a `?run=1` flag is present.

Scope

  • v1: built-in datasets only (8 keys already enumerated in `load_sample()`).
  • v2: custom CSV via content-hash + in-browser localStorage cache (no server). Out of scope here.

Implementation notes

  • `URLSearchParams` on page load in `frontend/js/app.js`.
  • Add helpers `encodeExperiment(state)` / `decodeExperiment(params)` to keep parsing in one place.
  • A "Share" button next to "Export" that copies the current URL via `navigator.clipboard`.

Acceptance criteria

  • Opening a shared URL reproduces the exact UI state (dataset, target, features, model selection, CV folds).
  • Share button writes a working URL to the clipboard.
  • Invalid / unknown params are ignored gracefully (no UI break).

Strategic rationale

Unlocks teaching, blog content, benchmark cases on the landing page, and team collaboration without any backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions