id: roc-curve
name:
  ja: ROC曲線・閾値選定
  en: ROC Curve and Threshold Selection
purpose:
  ja: 分類閾値ごとの偽陽性率と真陽性率をROC平面へ置き、無作為判定の基準と識別性能、運用候補の位置を比較する。
  en: Plot false-positive and true-positive rates across classifier thresholds to compare discrimination with chance and inspect a selected operating candidate.
status: published
still: ./still.png
category: analysis
catalogOrder: 805
jobs:
  - compare-choose
  - prioritize-diagnose
useCases:
  - prioritization
  - kpi
layoutKinds:
  - matrix
tags:
  - roc-curve
  - classifier-evaluation
  - threshold-selection
  - offline
  - responsive
whenToUse:
  - ja: 分類スコアの閾値を動かしたとき、陽性の見逃しと誤検知がどう変わるかを評価する。
    en: Use to compare how missed positives and false alarms change as a classifier threshold moves.
  - ja: 無作為判定の対角線を基準にモデル識別力を読み、業務コストを踏まえた候補点を話し合う。
    en: Use the chance diagonal to read discrimination and discuss candidate thresholds against operational costs.
avoidWhen:
  - ja: 規格限界への適合、時系列の工程安定性、または選定候補の最終運用判断を単独で確定したい場合。
    en: Do not use to decide specification compliance, process stability, or an operating threshold without cost context.
  - ja: 軸が偽陽性率・真陽性率ではない一般の二変量関係を示す場合は散布図を使う。
    en: Use a scatter plot for general two-variable relationships that are not threshold-swept classification rates.
requiredInputs:
  - ja: 陽性クラスを定義し、評価データ上の偽陽性率・真陽性率を分類閾値の降順で入力する。割合は0〜1。
    en: Define the positive class and supply false-positive and true-positive rates in descending threshold order, as fractions from zero to one.
  - ja: ROC曲線は(0,0)と(1,1)の両端を含め、運用候補の点IDを一つ選ぶ。閾値選定には誤検知・見逃しのコストを併記する。
    en: Include the (0,0) and (1,1) endpoints, select one operating candidate by point ID, and consider false-alarm and miss costs separately.
relatedLayouts:
  - scatter-relationship
  - control-chart
dataSchema:
  title: string — 分類器の識別性能について伝える見出し
  subtitle: string? — 対象期間・評価データ・陽性クラスの前提
  positiveClass: string — 検出対象とする陽性クラス
  selectedPointId: string — 運用候補として選んだ閾値点のID
  points: array (id, label, threshold, falsePositiveRate, truePositiveRate) — 閾値降順4〜12点。両端は(0,0)と(1,1)。率は0〜1で非減少。曲線下面積は図示時に台形積分
sources: []
