From an equation to a running model
Why does a larger learning rate make a fitted line oscillate? How can a network learn XOR when a linear classifier cannot? Data Science Lab lets a learner change one quantity, see its effect and inspect the computation responsible.
Learn develops the mathematics with worked examples. Playground runs seeded TypeScript experiments in the browser. Code Lab sends an experiment identifier and bounded numerical parameters to a FastAPI service. The service runs the displayed Python template and records values after marked steps. A frontend alone supports reading and browser experiments. Python runs require a reachable backend.
What a learner can inspect
| Experiment | What changes on screen |
|---|---|
| Linear regression | Move the fitted line or change the learning rate. The residuals, contour plot and 3D quadratic loss surface show the same parameters. |
| Logistic regression | Move the probability threshold to change the decision boundary and confusion counts. Compare ranking, classification and calibration on a stratified split. |
| K-Means | Follow Lloyd’s assignment and centroid updates. A three-feature example shows clusters that overlap in a two-dimensional projection. |
| MLP and backpropagation | Inspect hidden activations on XOR, moons or circles. Step backwards through a computational graph to see how local derivatives determine a weight update. |


Checking the numbers
The trace carries the executed source and changes to watched variables. The browser rebuilds the states and checks derived values against them. In the MLP experiment it reconstructs hidden-layer matrices from traced parameters and compares per-unit summaries. PyTorch supplies gradients through autograd. A scikit-learn fit appears as a library call, with its fitted result available for comparison.

The tests compare analytic gradients with finite differences, browser trajectories with NumPy fixtures, and PyTorch backpropagation with explicit NumPy updates from the same weights. These checks cover the implemented examples. The catalogue also lists planned topics. This page describes the four working modules on the development branch.