-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[ENH] - Naive variance prediction estimator #1865
[ENH] - Naive variance prediction estimator #1865
Conversation
@fkiraly I have created the naive variance estimator and tested it with some forecasters but there some cases where it won't work:
|
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.
Good start!
Regarding the design:
- you should also implement
predict_var
(without underscore) in theBaseForecaster
. Boilerplate methods likecheck_fh
should go there - see how the otherpredict_etc
methods are implemented. - I think it´s better to return not a
numpy.ndarray
, but apd.DataFrame
(so the index is preserved)
I also left comments in the code.
Some bugs not mentioned there:
- your code does not work if the forecaster is multivariate
- I think your
_predict_quantiles
is incorrect - is your
_predict_var
implementing the formula we discussed? I think not? I also recommend to put the math in the docstring.
I´m slightly confused - are your predictions not all out of sample, with a rolling window? |
they are all out of sample now. I actually made it compute in sample as well so that it would be possible to compute in sample variance but I removed it now. |
Finally found why predict quantiles and intervals tests were failing. It was because I didn't use |
…ut not prediction
…outawwakil/sktime into probabilistic_forecasting
I made some minor changes to the base class docstrings, extension template, and signature, to ensure everything is coherent after the batch of recent merges. |
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.
Thanks for implementing!
Excellent, does not seem to require any additional changes imo.
I took the liberty of ensuring that this consistently merges with a number of other PR on probabilistic forecasting recently merged. Mostly docstring changes, but I also made sure that the signatures are consistent.
#1687
@fkiraly
As part of the probabilistic forecasting API, this will implement the
_predict_var
method to forecastersSTEP probabilistic forecasting API
_predict_var
and its corresponding tag to the forecasting extension template.NaiveVariance
composite class which implements the 'simple strategy' for variance prediction._predict_var
and its corresponding inNaiveVariance
._predict_quantiles
inNaiveVariance
where quantiles are inferred from a normal distribution.cov=True
)