Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]: Target time series with columns [‘unique_id’, ‘ds’, ‘y’], Exogenous time series with columns [‘unique_id’, ‘ds’, ‘y’], Static exogenous variables with columns [‘unique_id’, ‘ds’] and static variables.
m5_winner_url = 'https://github.com/Nixtla/m5-forecasts/raw/main/forecasts/0001 YJ_STU.zip'winner_evaluation = M5Evaluation.evaluate('data', m5_winner_url)# Test of the same evaluation as the original onetest_close(winner_evaluation.loc['Total'].item(), 0.520, eps=1e-3)winner_evaluation
Also the method evaluate can recevie a pandas DataFrame of forecasts.
m5_second_place_url = 'https://github.com/Nixtla/m5-forecasts/raw/main/forecasts/0002 Matthias.zip'm5_second_place_forecasts = M5Evaluation.load_benchmark('data', m5_second_place_url)second_place_evaluation = M5Evaluation.evaluate('data', m5_second_place_forecasts)# Test of the same evaluation as the original onetest_close(second_place_evaluation.loc['Total'].item(), 0.528, eps=1e-3)second_place_evaluation
By default you can load the winner benchmark using the following.
winner_benchmark = M5Evaluation.load_benchmark('data')winner_evaluation = M5Evaluation.evaluate('data', winner_benchmark)# Test of the same evaluation as the original onetest_close(winner_evaluation.loc['Total'].item(), 0.520, eps=1e-3)winner_evaluation
The evaluation metric of the Favorita Kaggle competition was the
normalized weighted root mean squared logarithmic error (NWRMSLE).
Perishable items have a score weight of 1.25; otherwise, the weight is
1.0.NWRMSLE=∑i=1nwi∑i=1nwi(log(y^i+1)−log(yi+1))2