← Algo Playground
MACHINE LEARNING · BINARY CLASSIFICATION

Learn where one class becomes another.

Label your data, watch probabilities change, and explore the boundary between two classes.

PROBABILITY LANDSCAPE

P(class 1) = sigmoid(z)

Two features · one straight boundary

P(class 1) = 00.5 · uncertain1

Squares = class 0; circles = class 1. Dashed outlines mark incorrect predictions. Editing data resets training. Up to 100 points.

Ready

EPOCH / POINTS0 / 0
BINARY CROSS-ENTROPY—
TRAINING ACCURACY—
CLASS 0 / CLASS 10 / 0
LEARNING & ERRORS

Loss and classification tell different stories.

Confusion matrix · current training points
Predicted 0Predicted 1
Actual 000
Actual 100

These metrics describe the training data, not unseen-data performance. Loss measures probability quality; accuracy counts thresholded decisions.

EXPLORE A DECISION

Probability first. Class second.

Predict class 1 when its probability is at least this threshold. This changes the boundary and confusion matrix, not the learned weights or loss.


How learning works

  1. Score: z = w₁X₁ + w₂X₂ + b.
  2. Probability: sigmoid(z) maps the score to 0–1.
  3. Learn: gradient descent adjusts the weights to reduce binary cross-entropy.

With these two raw features, the decision boundary is straight. It cannot separate XOR perfectly. Probabilities near 0.5 indicate uncertainty; confidence does not guarantee correctness.