시작하기무료로 시작하기

Identifying model drift

Now you'll plot the model scores over time to visualize when drift occurs. By adding the threshold line and RMSE rolling windows, you can see how the trailing error lines indicate performance degradation.

The fc_log dataset with calculated moving averages, rmse_threshold, and Plotly as go have been pre-loaded for you.

이 연습은 강의의 일부입니다

Designing Forecasting Pipelines for Production

강의 보기

실습형 인터랙티브 연습

이 예제를 이 샘플 코드를 완성하여 풀어보세요.

p = go.Figure()

# Add RMSE line
p.add_trace(go.Scatter(x=fc_log["forecast_start"], y=fc_log["____"],
                        mode='lines',
                        name='RMSE',
                        line=dict(color='royalblue', width=2)))

# Add the RMSE rolling windows for 7 and 14 days
p.add_trace(go.Scatter(x=fc_log["forecast_start"], y=fc_log["____"],
                        mode='lines',
                        name='7 Days MA',
                        line=dict(color='green', width=2)))

p.add_trace(go.Scatter(x=fc_log["forecast_start"], y=fc_log["____"],
                        mode='lines',
                        name='14 Days MA',
                        line=dict(color='orange', width=2)))

p.add_trace(go.Scatter(x=[fc_log["forecast_start"].min(), fc_log["forecast_start"].max()], 
y=[rmse_threshold, rmse_threshold], 
name="Threshold",
line=dict(color="red", width=2, dash="dash")))

# Add plot titles and show the plot
p.update_layout(title="Forecast Error Rate Over Time",
                xaxis_title="____",
                yaxis_title="____", 
                height=400,
                title_x=0.5,
                margin=dict(t=50, b=50, l=50, r=50))
p.show()
코드 편집 및 실행