Classification Algorithms Playground (2D)
Click to plant your own labelled points on a 2D canvas and watch k-Nearest Neighbours and Logistic Regression paint the decision boundary live: a real gradient-descent classifier, a real leave-one-out k-NN vote, a genuine ROC curve with trapezoidal AUC, and an adjustable threshold that repaints the confusion matrix instantly.
Classification is the supervised-learning task of assigning a discrete label to an input, and different algorithms draw wildly different decision boundaries even on identical data. This 2D playground trains two of the most common ones — k-Nearest Neighbours and Logistic Regression — on the same point cloud and paints each classifier's output probability directly onto the canvas as a colour field: deep blue means "confidently class 0", deep red means "confidently class 1", and a bright contour traces the exact decision boundary at your chosen threshold. Click anywhere to plant a new labelled point and watch both classifiers retrain live, while a genuine ROC curve — swept across every threshold from the classifiers' real scores — reports the computed AUC. Adjust k, class separation and the threshold to see how a local, distance-based vote differs from a single global linear boundary.
Click to plant your own labelled points on a 2D canvas and watch k-Nearest Neighbours and Logistic Regression paint the decision boundary live: a real gradient-descent classifier, a real leave-one-out k-NN vote, a genuine ROC curve with trapezoidal AUC, and an adjustable threshold that repaints the confusion matrix instantly.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install