Skip to content

Commit 8dc645a

Browse files
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

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# contour-decision-boundary: Decision Boundary Classifier Visualization
2+
3+
## Description
4+
5+
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.
6+
7+
## Applications
8+
9+
- Evaluating the performance of classification algorithms (SVM, KNN, logistic regression, decision trees) on 2D data
10+
- Teaching machine learning concepts by visualizing how different classifiers create decision boundaries
11+
- Comparing classifier complexity and potential overfitting by examining boundary smoothness
12+
- Debugging classification models by identifying misclassified training samples
13+
14+
## Data
15+
16+
- `X1` (numeric) - First feature dimension, continuous values
17+
- `X2` (numeric) - Second feature dimension, continuous values
18+
- `y` (categorical) - Class labels for each training point (typically 2-5 classes)
19+
- Size: 50-500 training points, with a dense mesh grid (100x100 to 200x200) for boundary visualization
20+
- Example: Synthetic classification data (make_moons, make_circles, make_blobs) or reduced real-world features
21+
22+
## Notes
23+
24+
- Use distinct colors for each class region with appropriate transparency
25+
- Overlay training points with markers showing true class labels
26+
- Consider using different marker styles to highlight correctly vs incorrectly classified points
27+
- Include a legend showing class labels
28+
- A trained classifier (sklearn or similar) is required to generate predictions on the mesh grid
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Specification-level metadata for contour-decision-boundary
2+
# Auto-synced to PostgreSQL on push to main
3+
4+
spec_id: contour-decision-boundary
5+
title: Decision Boundary Classifier Visualization
6+
7+
# Specification tracking
8+
created: 2025-12-31T05:22:31Z
9+
updated: 2025-12-31T05:22:31Z
10+
issue: 2921
11+
suggested: MarkusNeusinger
12+
13+
# Classification tags (applies to all library implementations)
14+
# See docs/concepts/tagging-system.md for detailed guidelines
15+
tags:
16+
plot_type:
17+
- contour
18+
- scatter
19+
data_type:
20+
- numeric
21+
- categorical
22+
domain:
23+
- machine-learning
24+
- statistics
25+
- education
26+
features:
27+
- classification
28+
- decision-boundary
29+
- 2d

0 commit comments

Comments
 (0)