Skip to content
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

[ENG] fix Lag for numpy int #2832

Merged
merged 1 commit into from
Jun 25, 2022
Merged

[ENG] fix Lag for numpy int #2832

merged 1 commit into from
Jun 25, 2022

Conversation

fkiraly
Copy link
Collaborator

@fkiraly fkiraly commented Jun 18, 2022

For strange reasons, Lag errors out if the integers in an integer lag specification are numpy integers, as opposed to python native integers.

This is relevant when attempting to pass integers from a ForecastingHorizon to Lag, which is the natural thing to do in reduction.

The fix is added to Lag, which now also can deal with numpy integers.

@fkiraly fkiraly added module:transformations transformations module: time series transformation, feature extraction, pre-/post-processing bugfix Fixes a known bug or removes unintended behavior labels Jun 18, 2022
@fkiraly fkiraly merged commit 89d2e79 into main Jun 25, 2022
@fkiraly fkiraly deleted the lag_numpy branch June 25, 2022 10:59
fkiraly added a commit that referenced this pull request Aug 10, 2022
Prototype rework of the direct reducer, to showcase how a larger refactor could work and solicit feedback.

Reworks the direct reducer in order to:
* allow concurrent use of exogeneous data `X`, up to and including the setting where only `X` at the same time is used to predict `y`
* support `pandas` input to `sklearn` estimators and associated features, e.g., inspecting fitted model parameters with feature names
* factor out the complexity of lagging and windowing to the transformer `Lag`, and of imputing to the transformer `Imputer`. The code logic specific to the redicuer
* support for time stamp-like lags, through `Lag`

Depends on fix #2832 since `ForecastingHorizon` yields numpy integers which apparently break the `Lag` transformer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes a known bug or removes unintended behavior module:transformations transformations module: time series transformation, feature extraction, pre-/post-processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant