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.
Este exercício faz parte do curso
Designing Forecasting Pipelines for Production
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
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())