#live-training — Supervised learning
Six algorithms learning before your eyes, like a video: REC, timecode, subtitles, live metrics. Watching is free; touching the model is Premium.
What you'll play with
- Welcome to #live-training 🎬. Here, for once, you don't set anything up first: you watch. The scene plays a film in six episodes, one per algorithm: a line learning to predict a price, a boundary separating pass from fail, a map of neighbors drawing itself row by row, a tree carving up the plane, a forest casting votes, and a margin growing wider. REC dot, timecode, subtitles, live metrics: each episode lasts under a minute and the next one follows on. Watching is free, on a loop, as much as you like. Touching the model — learning rate, k, depth, margin, predicting a point — is Premium: if you try, I'll tell you with an "Oops".
- The film is rolling. Pause it whenever you like:
/pause. The REC dot gives way to PAUSED, the timecode freezes, and you can read the metrics at leisure. - Speed up:
/speed 2. The number of frames per second doubles. The slow episodes (the tree makes one split every 0.8 s) turn snappy; the gradient descents fly by. - Jump straight to an episode:
/episode knn. The film restarts at the beginning of episode 3: k-nearest neighbors has nothing to train, so we watch the decision map being computed pixel by pixel, then an unknown flower looking for its neighbors. - Missed a detail?
/replayrestarts the current episode from the first frame. Same seed, same draw, same film: it is deterministic on purpose — to compare, you need to watch the same thing again. - Your turn. Viewer side (free):
/episode tree,/episode forest,/episode svm,/speed 0.5,/subtitlesto hide or restore the subtitles,/autoplayto loop or stop at the end of an episode. Director side (Premium):/lr 0.05a cautious descent,/lr 1a descent that goes off the rails,/k 1nervous boundaries,/depth 6a tree that overfits,/trees 40a dense forest,/margin 20an uncompromising margin,/noise 0.9mixed-up data,/seed 12another draw,/predict 0.7 0.3to drop a star and read the model's verdict. Oops… those need the subscription — I'll tell you how. Next: #linear-regression to manipulate the line in 3D, or #knn to tune k yourself.
Channel commands
/episode <linear|logistic|knn|tree|forest|svm|next>— Jumps to an episode (or the next one) and plays it from the start./pause— Pauses the film (the timecode freezes)./play— Resumes playback of the film./speed <0.5|1|2|4>— Playback speed: 0.5 (slow motion) to 4 (fast forward)./replay— Restarts the current episode from the first frame (same draw)./subtitles— Shows or hides the teaching subtitles./autoplay— Turns automatic episode chaining on or off./reset— Returns to the first episode and to the default settings./lr <0.01..1>— 🔒 Premium · Learning rate of the gradient descents (episodes 1, 2, 6)./noise <0..1>— 🔒 Premium · Spread of the data: 0 = crisp clouds, 1 = heavily mixed./points <n=20..200>— 🔒 Premium · Number of points (one in four is held out for testing)./seed <1..99>— 🔒 Premium · Another random draw of the data (same settings)./k <1..15>— 🔒 Premium · Number of neighbors for KNN (episode 3)./depth <1..6>— 🔒 Premium · Maximum depth of the decision tree (episode 4)./trees <1..40>— 🔒 Premium · Number of trees in the random forest (episode 5)./margin <C=0.1..20>— 🔒 Premium · SVM constant C: penalty for points inside the margin (episode 6)./predict <x=0..1> <y=0..1>— 🔒 Premium · Drops a star at (x, y) and reads the trained model's answer.
Glossary
- Epoch
- One full pass over the training data, with one update of the parameters. In the film, every frame of episodes 1, 2 and 6 is an epoch: the line or the boundary moves a little at each one.
- Loss function
- The number training tries to drive down: MSE for regression, log-loss for logistic regression, hinge loss for the SVM. The curve going down to the right of the film is that number.
- Convergence
- The moment when updates become negligible: the loss barely moves anymore, the model has "arrived". The last subtitles of the gradient-descent episodes point it out.
- Divergence
- When the learning rate is too large, every step overshoots the bottom of the bowl and climbs higher than the previous one: the loss explodes. The film stops on a red line and an "Oops".
- Decision boundary
- The line (or surface) where the model changes its mind between two classes. Straight for logistic regression and the linear SVM, jagged for KNN, a staircase for a tree, blurry then crisp for a forest.
- Test set
- Points set aside (the hollow circles) that the model never sees during training. Honest accuracy is measured on them: classifying correctly what you learned by heart proves nothing.
- Support vector
- A training point sitting on the margin or inside it (ringed in yellow in episode 6). These are the only points that determine an SVM's boundary: removing the others would not move it.
- Gini index
- A measure of impurity of a group of points: 0 if a single class, maximal if the classes are in equal shares. At every node, a decision tree picks the split that lowers the average impurity of the two halves the most.
- Bootstrap and bagging
- Drawing n points with replacement from the n original ones gives a slightly different sample; training one model per sample and then letting the ensemble vote is bagging. A random forest is bagging of trees.
Other channels in Supervised learning
- #live-training — Six algorithms learning before your eyes, like a video: REC, timecode, subtitles, live metrics. Watching is free; touching the model is Premium.
- #linear-regression — Fit a line: least squares, residuals, MSE, R² and gradient descent — the first brick of every supervised model.
- #logistic-regression — Classify into two categories: sigmoid, decision boundary, threshold and log-loss — and why a line is not always enough.
- #decision-trees — A tree that carves the plane into rectangles: Gini, entropy, depth, pruning — and the overfitting you can see with your own eyes.
- #knn — k nearest neighbours: classify by resemblance, pick k, change the distance — and watch the boundary smooth out or shatter.
- #svm-margins — Support vector machines: the widest possible margin, the C parameter, and the RBF kernel that curves the boundary.
- #classification-metrics — Precision, recall, F1, confusion matrix, ROC and AUC: reading a classifier honestly, especially when classes are imbalanced.