Skip to content

spec: add confusion-matrix specification#2277

Merged
github-actions[bot] merged 1 commit intomainfrom
specification/confusion-matrix
Dec 26, 2025
Merged

spec: add confusion-matrix specification#2277
github-actions[bot] merged 1 commit intomainfrom
specification/confusion-matrix

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

New Specification: confusion-matrix

Related to #2272


specification.md

confusion-matrix: Confusion Matrix Heatmap

Description

A specialized heatmap visualization for evaluating classification model performance, displaying the counts or proportions of predicted vs actual class labels. The confusion matrix reveals true positives, false positives, true negatives, and false negatives at a glance, making it essential for understanding model behavior, identifying class imbalances, and diagnosing specific misclassification patterns.

Applications

  • Binary classification model evaluation showing sensitivity and specificity
  • Multi-class classifier performance analysis with per-class accuracy breakdown
  • Model comparison to identify which classes are most often confused
  • Error analysis to understand systematic misclassification patterns

Data

  • true_labels (categorical) - ground truth class labels for each sample
  • predicted_labels (categorical) - model-predicted class labels for each sample
  • class_names (string) - display names for each class on the axes
  • Size: 2-20 classes (larger matrices may have readability issues)
  • Example: Classification results from a trained model on test data

Notes

  • Label axes clearly: "True Label" (y-axis) and "Predicted Label" (x-axis)
  • Annotate cells with counts or percentages for precise interpretation
  • Support normalization options: none (raw counts), by row (recall), by column (precision), or by total
  • Use sequential colormap (e.g., Blues) for count data
  • Include colorbar showing the value scale
  • Consider highlighting diagonal (correct predictions) for visual clarity

Next: Add approved label to the issue to merge this PR.


🤖 spec-create workflow

@github-actions github-actions Bot merged commit 022c7e7 into main Dec 26, 2025
4 checks passed
@github-actions github-actions Bot deleted the specification/confusion-matrix branch December 26, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants