Transforming backtesting output
Once backtesting is complete, you will need to transform the data in order to effectively evaluate the results and choose the best-performing model.
이 연습은 강의의 일부입니다
Designing Forecasting Pipelines for Production
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
models = list(ml_models.keys())
bkt_long = pd.melt(
bkt_df,
id_vars=["unique_id", "ds", "cutoff", "y"],
# Complete two f-strings
value_vars=models + [f"{____}-lo-95" for model in models] + [f"{____}-hi-95" for model in models],
var_name="model_label",
value_name="value")
print(bkt_long.head())