medium_articles icon indicating copy to clipboard operation
medium_articles copied to clipboard

How to split train tests when using n_lags in neural predictors

Open boozesounds opened this issue 4 years ago • 0 comments

https://github.com/erykml/medium_articles/blob/master/Time%20Series/neural_prophet.ipynb

After seeing your good medium article, I wanted to test it with n_lags and n_forecasts, but I get the following error: Do you know a workaround if testing using auto regression?

----> 5 print(f"NeuralProphet:\t{mean_squared_error(df_test['y'], forecast.iloc[-n_forecasts:]['yhat1']):.4f}") ValueError: Input contains NaN, infinity or a value too large for dtype('float64').

boozesounds avatar May 31 '21 18:05 boozesounds