Python으로 Machine Learning 모니터링
Maciej Balawejder
Data Scientist


# 알고리즘 초기화
cbpe = nannyml.CBPE(
problem_type='classification_binary',
y_pred_proba='predicted_probability',
y_pred='prediction',
y_true='employed',
metrics=['roc_auc'],
chunk_period='m',
# chunk_size = 5000,
# chunk_number = 10
)
표준편차 임계값
# 표준편차 임계값
stdt = StandardDeviationThreshold(
std_lower_multiplier=3,
std_upper_multiplier=3
)
고정 임계값
# 고정 임계값
ct = ConstantThreshold(
lower=0.85,
upper=0.95
)
# 임계값 메서드 임포트(이전 슬라이드)
from nannyml.thresholds import ConstantThreshold, StandardDeviationThreshold
# 임계값을 CBPE 알고리즘에 전달
estimator = nannyml.CBPE(...
metrics = ['roc_auc', 'accuracy'],
thresholds={'roc_auc': ct, 'accuracy' : stdt}
)

filtered_results = results.filter(period='analysis')
지표별
filtered_results = results.filter(metrics=['mae'])
둘 다
filtered_results = results.filter(period='analysis', metrics=['mae'])
# 결과를 데이터프레임으로 내보내기
results.filter(period='analysis').to_df()

Python으로 Machine Learning 모니터링