Skip to content

Shift of exogenous data #1234

Closed
brsnw250 opened this issue Apr 20, 2023 · 2 comments · Fixed by #1254
Closed

Shift of exogenous data #1234

brsnw250 opened this issue Apr 20, 2023 · 2 comments · Fixed by #1254
Assignees
Labels
enhancement New feature or request

Comments

@brsnw250
Copy link
Collaborator

brsnw250 commented Apr 20, 2023

🚀 Feature Request

Add class ExogShiftTransform for automatic shift of exogenous data based on lag transform.

Proposal

class ExogShiftTransform(IrreversibleTransform, FutureMixin):
    def __init__(self, lags: Union[int, Literal["auto"]], horizon: Optional[int] = None):
        pass

   def _fit(self, df: pd.DataFrame) -> "ExogShiftTransform":
       pass
   
   def _transform(self, df: pd.DataFrame) -> pd.DataFrame:
       pass
  • lags: int -- use passed value to shift all exog columns
  • lags="auto" -- compute the size of the shift automatically. In this case, estimate for each series the minimal number of steps required to cover all horizon. It may be possible that each exog series will have its own shift size. Computation may be performed using the last available date of the exog variable and the prediction horizon.

When lags="auto" parameter horizon is mandatory.

Name shifted columns in format {exog_name}_shift_{exog_shift_size}.

Test cases

  • Test all necessary parameters set when initialising the transform.
  • Test that names for transformed data are correct.
  • Test all exog data correctly shifted for both modes.
  • Test that transform works within Pipeline for both modes.
  • Add transform to inference tests.

Additional context

No response

@brsnw250 brsnw250 added the enhancement New feature or request label Apr 20, 2023
@brsnw250 brsnw250 added this to the CLI enhancement milestone Apr 20, 2023
@Mr-Geekman
Copy link
Contributor

Mr-Geekman commented Apr 24, 2023

It seems like the task #1072 is relevant here.

@Mr-Geekman
Copy link
Contributor

It seems like the task #946 is relevant here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants