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
& SzymonStolarski [BUG] fix pmdarima interfaces breaking for X
containing more indices than forecasting horizon
#3667
Conversation
X
containing more indices than forecasting horizonX
containing more indices than forecasting horizon
strange: this test fails under 3.10 but not under 3.8 from sktime.forecasting.compose import TransformedTargetForecaster
from sktime.utils.estimator_checks import check_estimator
check_estimator(TransformedTargetForecaster, fixtures_to_run="test_predict_time_index_with_X[TransformedTargetForecaster-1-y:2cols-fh=1-range-int-True]", return_exceptions=False) |
X
containing more indices than forecasting horizonX
containing more indices than forecasting horizon
this seems to be related to Reverting the change to the |
X
containing more indices than forecasting horizonX
containing more indices than forecasting horizon
X
containing more indices than forecasting horizonX
containing more indices than forecasting horizon
Hi @fkiraly, It's been quite some time since this has been created, however I was wondering if it would be possible to go back to this PR and check the issue with the tests in order to fix #3657? I've been also playing around with the change in the y = load_airline()
X = pd.DataFrame({
'exo_1': y*5,
})
forecaster = ARIMA()
forecaster.fit(y=y, X=X) # Here we are passing data the standard way with `PeriodIndex`
# Here we would like to check the predictions passing quickly exo assumptions
forecaster.predict(fh=[1,2,3], X=pd.Series([123, 213, 321]) Will throw an error I assume predict would need to check if data passed in # PeriodIndex case
fh_abs = fh.to_absolute(self.cutoff).to_pandas()
if X is not None:
X = X.loc[fh_abs] or # No PeriodIndex case
fh_idx = fh.to_indexer(self.cutoff)
if X is not None:
X = X.loc[fh_idx] |
That might be a fix? PR with attempted fixes are appreciated - even if they fail, we learn sth. Maybe we should have a look how this behaves after the Also FYI @yarnabrina, who has recently been working on the |
This PR adds two arguments to `get_slice` to allow exclusive/inclusive bounding at either and of the slice. The default of the two new arguments leads to current behaviour, so no deprecation is necessary. This will be useful as a utility, and also for fixing #3667
X
containing more indices than forecasting horizonX
containing more indices than forecasting horizon
Fixes #3657.
The bug was caused by
pmdarima
models breaking when theX
passed was strictly larger than the indices in the forecasting horizon.The example code in #3657 has been added as a test (with minor generalization to cover more estimators).
In the future, we should probably also add test scenarios where
X
is strictly larger than the forecasting horizon.Depends on:
X
contains more indices than the forecasting horizon #3657get_slice
#4483 for slicingX