Skip to content

[Track B] quarterly_projection: 2단계 신뢰밴드(80%/95%) 노출 #107

@Knockcha

Description

@Knockcha

배경

대시보드 v4.3 시각화 가이드(2026-04-23 강민) 중 Line + Graded Confidence Band (2단계 80%/95%) 차트 적용 결정.

가이드 근거 (Wilke 2019):

"단순 error bar는 '확정 범위'로 오독 위험 (deterministic construal error). 2단계 그라데이션 밴드는 '점점 가능성 낮아짐'을 직관적으로 전달."

현재 QuarterlyProjection은 단일 confidence_lower / confidence_upper만 노출 — 신뢰 수준이 80%인지 95%인지도 명시 X.

요청 사항

QuarterlyProjection 스키마에 다음 필드 추가:

class QuarterlyProjection(BaseModel):
    quarter: int
    revenue: float                        # 중앙값 (P50)
    cumulative_profit: float
    # 기존 confidence_lower/upper는 deprecated → 제거 또는 ci_80과 동기화
    ci_80_lower: float | None = None      # P10
    ci_80_upper: float | None = None      # P90
    ci_95_lower: float | None = None      # P2.5
    ci_95_upper: float | None = None      # P97.5

모델 측 작업

TCN 모델 출력에서 분위수 추출 (Nixtla mlforecast 표준):

  • mlforecast.predict(level=[80, 95]) → 양 신뢰수준 동시 추출 가능
  • 또는 mock_quantile fallback 비활성화 (실 모델 분위수만 노출)

관련 시각화

  • frontend/src/components/SimulationResult/QuarterlyProjectionChart.tsx — 현재 단일 Area, 2단계 fillOpacity 0.1/0.25 그라데이션으로 확장
  • frontend/src/components/SimulationResult/dashboard/tabs/ForecastTab.tsx — Forecast 탭 첫 차트
  • 가이드: §1-7 불확실성 / 신뢰구간 ⭐

완료 조건

  • QuarterlyProjectionci_80_*, ci_95_* 필드 추가
  • TCN 노드에서 두 분위수 동시 산출
  • 기존 confidence_lower/upperci_80_*과 동기화하여 하위 호환 유지 (deprecated 주석)
  • 데이터 부재 시 None 반환 (mock 금지 — IM3-144 incident 근거)
  • 프론트는 자동 활성화 (현 PR에서 ci_95_* 있으면 2단계 렌더, 없으면 기존 단일 밴드 fallback)

우선순위

Track B (블로커 아님). 본 트랙 PR 머지 후 진행 가능.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions