id: confusion-matrix
name:
  ja: しきい値固定の混同行列
  en: Thresholded Confusion Matrix
purpose:
  ja: 単一しきい値での真陽性・偽陽性・偽陰性・真陰性の実件数を示し、見逃しと誤検知の運用影響を比較する。
  en: Show true and false positive and negative counts at one threshold to assess operational miss and alert costs.
status: published
still: ./still.png
category: analysis
catalogOrder: 980
jobs:
  - prioritize-diagnose
  - measure-change
useCases:
  - prioritization
  - kpi
layoutKinds:
  - matrix
tags:
  - confusion-matrix
  - classification-evaluation
  - offline
  - responsive
whenToUse:
  - ja: 固定した分類しきい値で、正しい判定と2種類の誤りの件数を確認する。
    en: Use to inspect correct predictions and both error types at a fixed threshold.
  - ja: 見逃しと誤検知を、実件数と運用コストに照らして判断する。
    en: Compare actual miss and alert counts against their operational costs.
avoidWhen:
  - ja: しきい値を動かしながら性能を比較する場合はROC曲線を使う。
    en: Use an ROC curve to compare performance across thresholds.
  - ja: 予測確率と実際の発生率の対応を見る場合は校正曲線を使う。
    en: Use a calibration curve to compare predicted probabilities with observed rates.
requiredInputs:
  - ja: 陽性・陰性クラス、しきい値、混同行列の4実件数を指定する。
    en: Supply positive and negative classes, one threshold, and all four confusion counts.
  - ja: 適合率・再現率・特異度・正解率はセル件数から導出する。
    en: Precision, recall, specificity, and accuracy are derived from cell counts.
relatedLayouts:
  - roc-curve
  - calibration-curve
dataSchema:
  title: string — 評価結論を伝える見出し
  subtitle: string? — 評価データ・期間
  positiveLabel, negativeLabel: string — 異なるクラス名
  threshold: number — 0〜1の単一分類しきい値
  counts: object (tp, fp, fn, tn) — 0以上の安全な整数。合計は1件以上
sources: []
