hierarchicalforecast icon indicating copy to clipboard operation
hierarchicalforecast copied to clipboard

Saved Prefitted ARIMA Base Forecasts for TourismL

Open kdgutier opened this issue 2 years ago • 1 comments

It would be convenient to have prefitted ARIMA base forecasts for medium and large datasets on S3.

  • We guarantee replicability.
  • We can save a lot of time for potential users and other researchers.
  • Circle CI tests that check time efficiency can greatly benefit from this dataset.

kdgutier avatar Dec 17 '22 00:12 kdgutier

Concretely this block:

%%capture
if os.path.isfile('Y_hat.csv'):
    Y_hat_df = pd.read_csv('Y_hat.csv')
    Y_fitted_df = pd.read_csv('Y_fitted.csv')

    Y_hat_df = Y_hat_df.set_index('unique_id')
    Y_fitted_df = Y_fitted_df.set_index('unique_id')
else:
    fcst = StatsForecast(
        df=Y_train_df, 
        models=[AutoARIMA(season_length=12)],
        fallback_model=[Naive()],
        freq='M', 
        n_jobs=-1
    )
    Y_hat_df = fcst.forecast(h=12, fitted=True, level=[80])
    Y_fitted_df = fcst.forecast_fitted_values()
    Y_hat_df.to_csv('Y_hat.csv')
    Y_fitted_df.to_csv('Y_fitted.csv')

In this nb: https://github.com/Nixtla/hierarchicalforecast/blob/main/nbs/examples/TourismLarge-Evaluation.ipynb

mergenthaler avatar Dec 17 '22 00:12 mergenthaler