Constraints for predictions #151
-
Hi, It looks like for now, constraints such as non-negativity cannot be imposed for predictions/forecasts (correct me if I'm wrong!) I guess this would be achieved through giving the user a hyperparameter option for the activation function of the network? Is this something that is coming in future versions? FWIW the data I'm using is 0 at many/most days, and >>0 roughly twice a week. Imagine something like lottery ticket sales where the lottery occurs twice a week. So any other tips for working with a series like this are greatly appreciated. John |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Probably related to #141 |
Beta Was this translation helpful? Give feedback.
-
Hi John, |
Beta Was this translation helpful? Give feedback.
-
Hi John, Regarding your problem at hand, I would advise considering the following options:
df['A'] = df['y'].rolling(14, min_periods=1).mean()
df['B'] = df['y'].rolling(56, min_periods=1).mean()
m = m.add_lagged_regressor(name='A', only_last_value=True)
m = m.add_lagged_regressor(name='B', only_last_value=True) If you still encounter negative forecasts after trying this, there might be an issue - please feel free to open a new issue then. |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for the suggestions - I will give them a try. |
Beta Was this translation helpful? Give feedback.
-
Great, please let us know if it worked for you! |
Beta Was this translation helpful? Give feedback.
-
Adding a rolling average has been very helpful. Thank you. |
Beta Was this translation helpful? Give feedback.
Hi John,
Regarding your problem at hand, I would advise considering the following options:
NeuralProphet(normalize_y="minmax")
If you still encounte…