True class 0 True class 1 Misclassified

Classification Algorithms Playground (2D)

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.