Commit 8dc645a
authored
spec: add contour-decision-boundary specification (#2933)
## New Specification: `contour-decision-boundary`
Related to #2921
---
### specification.md
# contour-decision-boundary: Decision Boundary Classifier Visualization
## Description
A decision boundary visualization showing how a classifier partitions 2D
feature space into predicted class regions. Colored regions indicate the
predicted class at each point in the feature space, with training data
points overlaid to show how well the classifier separates different
classes. This visualization is essential for understanding classifier
behavior, identifying decision boundaries, and evaluating classification
accuracy in machine learning.
## Applications
- Evaluating the performance of classification algorithms (SVM, KNN,
logistic regression, decision trees) on 2D data
- Teaching machine learning concepts by visualizing how different
classifiers create decision boundaries
- Comparing classifier complexity and potential overfitting by examining
boundary smoothness
- Debugging classification models by identifying misclassified training
samples
## Data
- `X1` (numeric) - First feature dimension, continuous values
- `X2` (numeric) - Second feature dimension, continuous values
- `y` (categorical) - Class labels for each training point (typically
2-5 classes)
- Size: 50-500 training points, with a dense mesh grid (100x100 to
200x200) for boundary visualization
- Example: Synthetic classification data (make_moons, make_circles,
make_blobs) or reduced real-world features
## Notes
- Use distinct colors for each class region with appropriate
transparency
- Overlay training points with markers showing true class labels
- Consider using different marker styles to highlight correctly vs
incorrectly classified points
- Include a legend showing class labels
- A trained classifier (sklearn or similar) is required to generate
predictions on the mesh grid
---
**Next:** Add `approved` label to the issue to merge this PR.
---
:robot: *[spec-create
workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20612677554)*
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>1 parent 0a0f5e9 commit 8dc645a
2 files changed
Lines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments