Decision Boundary Results
Model summary
Confusion matrix
Prediction details
Formula Used
Linear decision function: f(x) = w1x1 + w2x2 + b
Logistic probability: P(y = 1 | x) = 1 / (1 + e-f(x))
Euclidean distance: d(x, z) = √[(x1 − z1)² + (x2 − z2)²]
SVM decision: class(x) = sign(w · x + b)
Accuracy: correct predictions / total predictions
F1 score: 2 × precision × recall / (precision + recall)
Generalisation gap: training accuracy − testing accuracy
How to Use
- Paste data or generate a synthetic classification dataset.
- Choose preprocessing, splitting, and validation settings.
- Select a classifier and adjust its main parameters.
- Customize the decision regions and point appearance.
- Press Calculate and Plot to train the model.
- Review metrics, predictions, warnings, and the confusion matrix.
- Click the chart to test new coordinates interactively.
- Export the chart, predictions, dataset, or PDF report.
Example Data
| X1 | X2 | Class | Expected region |
|---|---|---|---|
| 1.0 | 1.2 | Class A | Lower-left region |
| 2.5 | 1.6 | Class A | Lower-middle region |
| 4.4 | 4.2 | Class B | Upper-middle region |
| 6.1 | 4.9 | Class B | Upper-right region |
Frequently Asked Questions
What is a decision boundary?
It is the dividing line or region separating predicted classes.
Why does scaling change the boundary?
Distance-based and gradient-based models react strongly to feature scale.
Can the calculator handle multiclass data?
Yes. It supports multiple class regions and per-class metrics.
What causes an irregular boundary?
Noise, model complexity, limited samples, and nonlinear relationships can contribute.
How can I identify overfitting?
Look for high training accuracy and noticeably lower testing accuracy.
Why might KNN look jagged?
Small neighbourhood sizes create highly local and flexible regions.
What does confidence shading show?
It estimates how certain the selected model is across feature space.
Can I upload labels as words?
Yes. Numeric or text labels are accepted and encoded automatically.
Does the calculator replace production libraries?
No. It is an educational browser implementation for exploration and comparison.