Hello everybody! I have forecasts with several mod...
# neural-forecast
y
Hello everybody! I have forecasts with several models from the neuralforecast package. Now I am having trouble using the predict_insample method. After making the Forecast and generating some plots I simply call: y_hat_insample = nf.predict_insample(step_size=1) I know step_size=1 will result in lots of calculation time, but after a few seconds on execution I get the foloowing error message: ValueError Traceback (most recent call last) Cell In[23], <vscode-notebook-cell:?execution_count=23&line=1|line 1> ----> <vscode-notebook-cell:?execution_count=23&line=1|1> Y_hat_insample = nf.predict_insample(step_size=1) <file///C/Users/ygerkman/AppData/Local/miniconda3/envs/fcquality/Lib/site-packages/neuralforecast/core.py:620|620> # Append predictions in memory placeholder <file///C/Users/ygerkman/AppData/Local/miniconda3/envs/fcquality/Lib/site-packages/neuralforecast/core.py:621|621> output_length = len(model.loss.output_names) --> <file///C/Users/ygerkman/AppData/Local/miniconda3/envs/fcquality/Lib/site-packages/neuralforecast/core.py:622|622> fcsts[:, col_idx : (col_idx + output_length)] = model_fcsts <file///C/Users/ygerkman/AppData/Local/miniconda3/envs/fcquality/Lib/site-packages/neuralforecast/core.py:623|623> col_idx += output_length <file///C/Users/ygerkman/AppData/Local/miniconda3/envs/fcquality/Lib/site-packages/neuralforecast/core.py:624|624> model.set_test_size(test_size=test_size) # Set original test_size ValueError: could not broadcast input array from shape (10322928,1) into shape (7002254,1) I'm a student and I'm glad for any help I can get.
j
Hey. Currently predict_insample only works when the series have the same size
y
@José Morales Thanks a lot! Do I understand correctly that each series in the dataset has to be of the same length?
j
For predict_insample yes