🎯 Binary Classification Playground

Set sample counts and see all classification metrics

📊 Generated Data & Predictions

# Actual Class Predicted Class Result

Confusion Matrix

Predicted 0
Predicted 1
Actual 0
True Negative (TN)
0
False Positive (FP)
0
Actual 1
False Negative (FN)
0
True Positive (TP)
0

Accuracy

0%
Accuracy = (TP + TN) / (TP + TN + FP + FN)
What it measures: The proportion of correct predictions (both positive and negative) among all predictions made.

When to use: Best for balanced datasets where both classes are equally important. Can be misleading with imbalanced data.

Precision

0%
Precision = TP / (TP + FP)
What it measures: Of all instances predicted as positive, how many were actually positive. Answers "How reliable are positive predictions?"

When to use: When false positives are costly (e.g., spam detection, where marking legitimate emails as spam is problematic).

Recall (Sensitivity)

0%
Recall = TP / (TP + FN)
What it measures: Of all actual positive instances, how many were correctly identified. Answers "How many positives did we catch?"

When to use: When false negatives are costly (e.g., disease detection, where missing a positive case is dangerous).

F1 Score

0%
F1 = 2 × (Precision × Recall) / (Precision + Recall)
What it measures: The harmonic mean of precision and recall. Balances both metrics into a single score.

When to use: When you need a balance between precision and recall, especially with imbalanced datasets. Higher F1 means better overall performance.