-
Notifications
You must be signed in to change notification settings - Fork 208
[ENH] Auto naive forecaster #2926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thank you for contributing to
|
return self._fitted_scalar_value | ||
# For "seasonal_last" strategy | ||
prediction_index = (self.horizon - 1) % self.season_ | ||
return self.self._y [prediction_index] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should be self.y[-self.season - 1 + prediction_index)] that way it is predicting the last seasonal value in the series, rather than the corresponding seasonal value at the start of the series
Naive forecaster with strategy set based on minimising error. | ||
|
||
Searches options, "last", "mean", and "seasonal_last", with season in range [2,max_season]. | ||
If max_season is not passed to the constructor, it will be set to series length/2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be length/4
max_season = len(y)/4 | ||
best_s = None | ||
best_seasonal = np.inf | ||
for s in range(1, max_season + 1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be 2 surely? - as the interval is [2, max_season]
Searches options, "last", "mean", and "seasonal_last", with season in range [2,max_season]. | ||
If max_season is not passed to the constructor, it will be set to series length/2. | ||
|
||
Simple first implementation, splits the train series into 70% train and 30% validation split |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe it does this, it simply minimises RMSE over the whole series passed in _fit
Simple forecaster that chooses either naive, mean or seasonal based on train error (or "in sample" as they call it).
Seems like a sensible benchmark to me, although Ive not seen it used. Main issues are
could easily cross validate, but seems OTT for this algorithm.