Skip to content
ToolUlkaa Tool
All tools

Machine Learning

TensorFlow PlaygroundConfusion Matrix CalculatorROC Curve and AUC CalculatorK-Means Clustering VisualizerGradient Descent VisualizerDecision Tree BuilderClassifier PlaygroundPCA VisualizerActivation Function Plotter

Categories

AcademicTextMathematicsStatisticsMachine LearningAIData ScienceFile
All tools
Machine Learning

Classifier Playground

Draw points, pick an algorithm and watch the decision boundary, then check it with cross-validation.

Algorithm
Try:
View
1 to 50
Class to add when you tap the plot

Training accuracy

100%

Training accuracy is measured on the same points the model learned from. Switch to cross-validation for an honest estimate on unseen points.

Points
120
Classes
3
Algorithm
k-nearest neighbours

Decision boundary

  • Class 1
  • Class 2
  • Class 3

A new point takes the majority class of its k closest training points. Small k follows the data closely (jagged, can overfit); large k smooths the boundary. Tap the plot to add points (dataset: Three blobs).

  1. Tools
  2. Machine Learning
  3. Classifier Playground

About Classifier Playground

This classifier playground is free, needs no sign-up and runs in your browser, so your points are never uploaded. Choose from k-nearest neighbours, logistic regression and Gaussian naive Bayes, pick a two-dimensional dataset or tap the plot to draw your own points of up to three classes, and see the regions each model assigns to each class.

The plot is only half the story. A model that fits the points you can see is not necessarily good at points it has not seen. Switch to cross-validation and the tool splits your points into folds, trains on all but one, tests on the one held out, and shows the accuracy of every fold with its mean and spread.

Everything is written in plain code and runs on your device. That makes the playground a good place to build intuition: watch k = 1 carve jagged islands, see a straight logistic boundary fail on rings and succeed when you raise the polynomial degree, and see naive Bayes struggle with an XOR pattern.

How to use Classifier Playground

  1. 1Choose an algorithm: k-nearest neighbours, logistic regression or Gaussian naive Bayes.
  2. 2Load a dataset (blobs, moons, circles or XOR), or clear the points and tap the plot to add your own. Choose which class a tap adds.
  3. 3Set the algorithm's option: k for nearest neighbours, or the polynomial degree for logistic regression.
  4. 4Look at the coloured regions. Each cell takes the colour of the class the model predicts there.
  5. 5Switch the view to Cross-validation, choose the number of folds, and read the accuracy per fold and the mean.
  6. 6Compare algorithms and settings on the same data using the mean cross-validation accuracy, not the training accuracy.

Features

  • Three classic classifiers written from scratch: kNN, softmax logistic regression and Gaussian naive Bayes.
  • Decision-region canvas that scales to your screen and accepts taps to add points.
  • Polynomial features of degree 1 to 3 for logistic regression, so it can learn curved boundaries.
  • Five datasets, up to three classes and up to 800 points.
  • k-fold cross-validation from 2 to 10 folds with a per-fold accuracy table, mean and standard deviation.
  • Repeatable results: folds are shuffled with a fixed seed.

How each classifier decides

k-nearest neighbours has no training step. To classify a point it finds the k closest training points by straight-line distance and takes a majority vote, with ties broken in favour of the closest neighbour.

Logistic regression learns weights by gradient descent so that a softmax of linear scores matches the classes. With two classes this is the usual sigmoid. Gaussian naive Bayes fits a normal curve to each feature in each class, multiplies the likelihoods as if the features were independent, weights them by the class frequency and picks the largest.

kNN:       class(x) = majority class among the k nearest points
Logistic:  P(class c | x) = exp(w_c . x) / sum of exp(w_j . x)
Bayes:     class(x) = argmax of log P(c) + sum over features of log N(x_f | mean_cf, var_cf)

Worked examples

  • k-nearest neighbours (k = 5) on three blobs of 40 points → gives training accuracy 100%, 5-fold CV 100%

    The standard deviation across folds is 0 points, because the blobs are well separated.

  • Logistic regression degree 1 versus degree 2 on circles → gives 52.5% versus 100% training accuracy

    A straight line cannot separate an inner circle from a surrounding ring. Adding squared terms lets the boundary curve around it.

Which algorithm suits which pattern

AlgorithmBoundary shapeGood atStruggles with
k-nearest neighboursAny shape, jagged for small kIrregular boundariesNoise at k = 1, many features, big data
Logistic regressionA line, or a curve with polynomial termsLinearly separable classes, probabilitiesCurved classes at degree 1
Gaussian naive BayesSmooth curvesSmall data, fast trainingCorrelated features, XOR-like patterns

Good to know

Why training accuracy is not enough

Training accuracy is measured on the very points the model learned from. A nearest-neighbour model with k = 1 scores 100% by construction, because each point is its own nearest neighbour. Cross-validation fixes this by testing every point exactly once on a model that never saw it. Each fold trains on the other folds and tests on its own, and the mean of the fold accuracies estimates how the model will do on new data.

The spread between folds matters too. A large standard deviation means the result depends heavily on which points happened to be held out, which is common with small datasets. Compare settings by their mean, and use the spread to judge whether a difference is real.

Scope of this playground

The models see only two numeric features, so they are teaching tools, not general-purpose libraries. Distances are in the plot's own units (0 to 100 on both axes). Logistic regression is trained for a fixed number of batch gradient steps, with no regularisation, and the tool does not tune settings for you.

Privacy: how it works

  • The points and the models stay in your browser tab. Nothing is sent to Ulkaa or anyone else.

Tips

  • Try k = 1, then k = 15, on the moons data and compare the boundary: small k is jagged, large k is smooth and may cut corners.
  • Add a single stray point of the wrong class inside a cluster and watch kNN with small k carve a tiny island around it.
  • On XOR, naive Bayes and plain logistic regression stay near chance, while kNN and polynomial logistic regression do well.
  • Use at least 10 points per class for cross-validation, or fold accuracies jump in large steps.

Frequently asked questions

Is it really free?

Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.

Do I need an account?

No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.

Does it run in my browser?

Yes. Your points are processed by code running in your browser tab, on your own device.

Is my data uploaded?

No. Your points are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.

What is a decision boundary?

The line or curve where a classifier switches from predicting one class to another. The coloured regions in the plot show the prediction at every position.

How does k-nearest neighbours work?

It stores the training points. To classify a new point it finds the k nearest ones and predicts the most common class among them.

How does logistic regression make a curved boundary?

By adding polynomial features such as x squared and x times y. The model is still linear in those features, but the boundary in the original plane curves.

Why does naive Bayes fail on XOR?

It treats the two features as independent within each class, and in XOR each class has the same average position, so no pair of independent bell curves can separate them.

What is k-fold cross-validation?

The data is split into k folds. Each fold in turn is held out as a test set while the model trains on the rest, and the k accuracies are averaged.

How many folds should I use?

Five or ten is typical. More folds use more training data per fold but take longer and give a more variable estimate.

Why is kNN training accuracy 100% when k is 1?

Each training point is its own nearest neighbour, so it always predicts its own label. Use cross-validation to see real performance.

Can I use my own data?

You can draw points on the plot, up to three classes and 800 points. CSV input is not part of this tool; the decision tree and PCA tools accept CSV.

Popular Classifier Playground pages

  • KNN Classifier VisualizerWatch the nearest-neighbour decision regions change as you vary k.
  • KNN Overfitting With Small KSet k to 1 on noisy moons and see the jagged boundary and the 100% training score.
  • Logistic Regression VisualizerWatch a straight logistic regression boundary separate two classes.
  • Logistic Regression Decision BoundarySee how polynomial features let logistic regression separate a ring from its core.
  • Naive Bayes Classifier VisualizerSee the smooth regions of a Gaussian naive Bayes model on three clusters.
  • Gaussian Naive Bayes on XORRun naive Bayes on a pattern it cannot learn, and compare it with kNN.
  • K-Fold Cross-Validation CalculatorSplit the data into folds, test each in turn, and read the accuracy per fold.
  • Cross-Validation for Logistic RegressionCheck a polynomial logistic regression on unseen folds of the two moons data.

Ulkaa Apps

  • Ulkaa
  • Calendar
  • Task
  • Note
  • Disk
  • Call
  • Contact
  • Mail
  • Finance
  • Health
  • Office
  • Work
  • Workspace
  • Halum
  • Jaal
  • Islam
  • Game
  • Weather
  • Campus
  • News
  • Developer
  • Help
  • Account
About·Privacy·Terms·© 2026 Ulkaa

What is Ulkaa Tool?

Ulkaa Tool is a free collection of fast, privacy-friendly online tools from Ulkaa Network. Calculate your GPA and CGPA, edit rich text, count words and characters, replace text and more — all in your browser.

Every tool runs entirely in your browser — no sign-up, and your data never leaves your device.

Academic

  • GPA Calculator
  • CGPA Calculator
  • Citation Generator
  • Quiz Maker

Text

  • Rich Text Editor
  • Word Counter
  • Character Counter
  • Text Replacement

Ulkaa

  • Ulkaa
  • Ulkaa News
  • Ulkaa Campus
  • Ulkaa Tool
  • Ulkaa Game
  • Ulkaa Weather
  • Ulkaa Islam

Company

  • About Ulkaa
  • Careers
  • Support
  • Help
  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • Sitemap

© 2015-26, Ulkaa. All rights reserved.
Facebook PageLinkedIn CompanyX (Twitter) ProfileInstagram ProfileGitHub Account