성능 추정

Python으로 Machine Learning 모니터링

Hakim Elakhrass

Co-founder and CEO of NannyML

알고리즘

  • CBPE - 신뢰도 기반 성능 추정
  • DLE - 직접 손실 추정
Python으로 Machine Learning 모니터링

직접 손실 추정

  • 회귀 작업에 사용
  • 모니터링 중인 모델의 손실 함수를 추정
  • LGBM을 보조 모델로 사용
  • NannyML은 MAE, MSE, RMSE 등 다양한 회귀 지표를 지원

 

이미지는 DLE 알고리즘의 작동 방식을 보여줍니다. 먼저 운영 데이터가 알고리즘으로 들어오고, 예측과 운영 데이터를 바탕으로 분석 세트가 생성됩니다. 이 분석 세트를 보조 모델에 전달하여 성능을 예측합니다.

Python으로 Machine Learning 모니터링

DLE - 코드 구현

# Initialize the DLE algorithm
estimator = nannyml.DLE(
    y_true='target',
    y_pred='y_pred',
    metrics=['rmse'],
    timestamp_column_name='timestamp',
    chunk_period='d'
    feature_column_names=features,
    tune_hyperparameters=False
)
# Fit the algorithm
estimator.fit(reference)
results = estimator.estimate(analysis)
Python으로 Machine Learning 모니터링

신뢰도 기반 성능 추정

  • 이진 및 다중 클래스 분류에 사용

  • 신뢰도 점수를 활용해 혼동 행렬을 추정

  • 모든 분류 성능 지표를 추정

 

이미지는 CBPE 알고리즘의 작동 방식을 보여줍니다. 먼저 분석 세트를 CBPE에 전달하여 혼동 행렬을 예측합니다. 이 혼동 행렬을 바탕으로 다른 분류 지표를 계산합니다.

Python으로 Machine Learning 모니터링

CBPE - 코드 구현

# Initialize the CBPE algorithm
estimator = nannyml.CBPE(
    y_pred_proba='y_pred_proba',
    y_pred='y_pred',
    y_true='targets',
    timestamp_column_name='timestamp',
    metrics=['roc_auc'],
    chunk_period='d',
    problem_type='classification_binary',
)
# Fit the algorithm
estimator.fit(reference)
results = estimator.estimate(analysis)
Python으로 Machine Learning 모니터링

결과

results.plot().show()

결과 플롯에는 시간에 따른 추정 RMSE 지표가 표시됩니다.

Python으로 Machine Learning 모니터링

연습해 봅시다!

Python으로 Machine Learning 모니터링

Preparing Video For Download...