레이블이 있을 때

Python으로 Machine Learning 모니터링

Maciej Balawejder

Data Scientist

추정 vs 실측 성능

추정 성능:

  • 모델의 예상 성능을 측정

  • CBPE, DLE 같은 추정기로 산출

  • 정답이 없을 때 추정

실측 성능:

  • 실제로 측정된 성능
  • 성능 계산기로 산출
  • 정답이 있을 때 계산
Python으로 Machine Learning 모니터링

지연된 정답

시간 축에 주마다 세 점이 있고, 매주 월요일에는 모델의 실측 성능을 평가하며, 월요일 사이에는 CBPE 추정기로 성능을 추정합니다.

Python으로 Machine Learning 모니터링

성능 계산기

# Intialize the calculator
calc = nannyml.PerformanceCalculator(
    y_pred_proba='y_pred_proba',
    y_pred='y_pred',
    y_true='arrived',
    timestamp_column_name='timestamp',
    problem_type='classification_binary',
    chunk_period='d',
    metrics=['roc_auc', 'accuracy'],
    )
# Fit the calculator
calc.fit(reference)
realized_results = calc.calculate(analysis)
Python으로 Machine Learning 모니터링

결과 시각화

# Show realized performance plot
results.plot().show()

이 그림은 실측 ROC AUC 그래프로, 2019년 4월부터 2019년 8월까지 성능 하락을 보여줍니다.

Python으로 Machine Learning 모니터링

실측 성능 vs 추정 성능

# Estimate and calculate results
estimated_results = estimator.estimate(analysis)
realized_results = calculator.calculate(analysis)


# Show comparison plot realized_results.compare(estimated_results).plot().show()
Python으로 Machine Learning 모니터링

실측 성능 vs 추정 성능

이 그래프는 ROC AUC 지표에 대해 실측 성능과 추정 성능을 비교합니다.

Python으로 Machine Learning 모니터링

Vamos praticar!

Python으로 Machine Learning 모니터링

Preparing Video For Download...