추정 성능과 실현 성능 비교하기
이제 성능 계산 방식이 어떻게 동작하는지 살펴봤으니, NYC green taxi 데이터셋의 팁 예측 모델에 대해 실현 성능을 계산해 보세요.
참조(reference) 세트와 분석(analysis) 세트는 이미 불러와 reference와 analysis 변수에 저장되어 있어요.
또한, 팁 예측을 위한 DLE 알고리즘 결과는 estimated_results 변수에 저장되어 있어요.
이 연습은 강의의 일부입니다
Python으로 Machine Learning 모니터링
연습 안내
- 계산기 초기화 시 문제 유형을
regression으로 지정하세요. - 참조 데이터를 사용해 계산기를 학습(fit)하고, 분석 세트에 대한 성능을 calculate 하세요.
compare()메서드를 사용해realized_results와estimated_results의 비교 플롯을 표시하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Intialize the calculator
calculator = nannyml.PerformanceCalculator(
y_true='tip_amount',
y_pred='y_pred',
chunk_period='d',
metrics=['mae'],
timestamp_column_name='lpep_pickup_datetime',
problem_type=____)
# Fit the calculator
calculator.fit(____)
realized_results = calculator.____(____)
# Show comparison plot for realized and estimated performance
____.____(____).plot().show()