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] Allow pd.Timedelta
values in ForecastingHorizon
#2333
Merged
fkiraly
merged 27 commits into
sktime:main
from
khrapovs:1737-khrapovs-test-timedelta-forecasting-horizon
Apr 4, 2022
Merged
[ENH] Allow pd.Timedelta
values in ForecastingHorizon
#2333
fkiraly
merged 27 commits into
sktime:main
from
khrapovs:1737-khrapovs-test-timedelta-forecasting-horizon
Apr 4, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
khrapovs
requested review from
fkiraly,
mloning,
aiwalter and
TonyBagnall
as code owners
March 28, 2022 15:16
…casters.TestAllForecasters.test_update_predict_predicted_index
…it.test_split_by_fh
fkiraly
reviewed
Mar 30, 2022
fkiraly
reviewed
Mar 30, 2022
…sting-horizon # Conflicts: # sktime/forecasting/base/_fh.py
srggrs
added a commit
to Gridsight/sktime
that referenced
this pull request
Apr 6, 2022
* upstream/main: [DOC] Added docstring examples to load data functions (sktime#2393) [ENH] Capability inference for transformer and classifier pipelines (sktime#2367) [ENH] Proba metric grid search integration (sktime#2234) [ENH] Faster classifier example parameters (sktime#2378) [ENH] Get rid of `pd.Int64Index` (sktime#2390) [ENH] Allow `pd.Timedelta` values in `ForecastingHorizon` (sktime#2333) [ENH] Partially replace `pd.Int64Index` with `pd.Index` (sktime#2339) relax name rules for multiindex (sktime#2384)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
One more contribution to #1737.
What does this implement/fix? Explain your changes.
In this PR I added
TEST_FHS_TIMEDELTA
test cases tosktime.forecasting.base.tests.test_fh.test_fh
. In order to pass the tests two changes were required inForecastingHorizon
itself: insktime.forecasting.base._fh.ForecastingHorizon._is_in_sample
and insktime.forecasting.base._fh.ForecastingHorizon._is_out_of_sample
. Both methods perform comparison with zero which in case ofpd.Timdelta
values should actually bepd.Timedelta(0)
.Note that
sktime.forecasting.base._fh.ForecastingHorizon.to_indexer
returnsNone
in the new timedelta case. I have no idea what this method should return in this case. Any suggestions are very much welcome.In addition, I have silenced the pre-commit error from (described here: #2338) by using
# noqa: B019
next to the@lru_cache
decorator.Does your contribution introduce a new dependency? If yes, which one?
No
What should a reviewer concentrate their feedback on?
Any other comments?
PR checklist
For all contributions