Target encoding — replacing a categorical value with the mean target of its category — is one of the most powerful feature-engineering tricks and one of the easiest ways to leak the label into the training set. This lab generates eight synthetic categories, each with its own true mean and a handful of noisy samples, and encodes them two ways: naively (each row's mean includes its own label) and out-of-fold (a K-fold split guarantees no row ever sees itself). Every row is plotted on a draggable, zoomable 2D scatter at (encoded value, true target), with a diagonal marking a perfect encoded = target fit, so you can watch the train cloud collapse onto that diagonal under naive encoding — especially with few samples per category — and spread back out to match the honest held-out cloud the moment K-Fold out-of-fold encoding is switched on. A synchronized bar panel turns the live train/held R² and the leakage gap into a single readable number, and clicking a category swatch isolates its rows across both panels.