ML Playground
Loading the playground… (it needs JavaScript)
How it works
Every block is one step of a scikit-learn Pipeline, and the wires are the data flowing between them. Green wires carry the table before the train/test split; blue ones, the training and test rows after it; orange ones, a fitted model. A wire's label is the shape that flows (rows × columns), with the text columns and the missing values still in it, so you see an Impute block remove the NaN and an Encode block remove the text.
While you drag a wire, the inputs where it makes sense light up green; amber ones take it with a note (leakage, nothing to impute); faded ones refuse it, and hovering one says why: a model needs a Split before it, a PCA cannot take text or missing values, there is nothing to encode after a reduction.
A block placed before the Split is fitted on every row, test rows included: if it learns something (a scaler, a feature selector) that is leakage, and the block says so. After the Split, each block is fitted on the training rows only. A Join puts lanes side by side, as a ColumnTransformer: start each lane at the same block with a Select columns.
The look blocks (EDA, table, 2D map, confusion matrix, ROC, importance…) can hang from any wire; click one and its settings, charts and analyses fill the panel on the right. { } Python shows the selected model's pipeline as a script that reproduces the numbers: consecutive blocks on the numeric or the text columns become one ColumnTransformer with a num and a cat branch, as written in class. Everything runs in your browser (Python via Pyodide); the graph is saved in this browser and ⇩/⇧ move it as a JSON file.
The guided version, one fixed pipeline with scenarios and goals, is the simulator.