Classifier arena
About this app
Eight classifiers learn on the same data: kNN, logistic regression, linear and RBF SVM, naive Bayes, decision tree, random forest and a neural network — their decision boundaries reveal the model family, train and test accuracy side by side expose overfitting.
The boundary’s shape reveals the model
Every classifier learns a decision boundary in feature space, and its shape follows from the model family. Linear models such as logistic regression and a linear SVM draw a straight line. kNN decides locally by its nearest neighbours. Decision trees and random forests cut axis-parallel rectangles. Naive Bayes, RBF SVMs and neural networks produce curved boundaries. Whether a model is good is shown not by training accuracy but by test accuracy on held-out points: 100 % on training data often means the noise has been memorised.
What you see
Eight cards, one per model: k-nearest neighbours, logistic regression, linear SVM, RBF SVM, Gaussian Naive Bayes, decision tree, random forest and a neural network (MLP with tanh, trained with Adam). Shading shows the predicted probability and a line marks the 0.5 boundary. Each card reports training and test accuracy, and a ranking compares them with the “always majority class” baseline. Clicking a card enlarges the model and opens its hyperparameters.
Things to try
Switch between the moons, circles, XOR, blobs, spiral and imbalanced datasets and compare which families cope. Increase the noise and watch the gap between training and test. Set k to 1 for kNN or let the tree grow without a depth limit. Add your own points with “+ A” and “+ B”; all models retrain immediately.
Frequently asked questions
- Which classifier is the best?
- No classifier is best on all data. Linear models are robust and easy to interpret but fail on curved boundaries; flexible models such as RBF SVMs or neural networks fit complex patterns but are more prone to overfitting. Comparing on held-out test data shows which model suits a given problem.
- What is a decision boundary?
- The decision boundary separates the regions of feature space in which a classifier predicts different classes. For probabilistic models it lies where the predicted probabilities of the classes are equal, which for two classes means at 0.5.
- Why is high training accuracy not a good sign?
- A model can memorise the training data including its noise and reach 100 % training accuracy. It still performs poorly on new data. A large gap between training and test accuracy is a typical sign of overfitting.
- What can I do in this app?
- You choose one of six datasets, set noise, number of points and test share, and compare eight classifiers side by side. Each model’s hyperparameters can be adjusted, such as k, C, γ, tree depth, number of trees or network size. You can add and drag your own training points.
Subject: Machine Learning
More from Machine Learning
- AdaBoost
- Anatomy of a prompt
- Data privacy traffic lights
- Decision Tree
- Ensemble: Bagging vs. Boosting
- Finding faces: masks versus learning from examples
- k-Means
- k-Nearest Neighbors (kNN)
A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps