Skip to content

Datetime Index support for sklego.pandas_utils.add_lags [FEATURE] #428

@AlanGanem

Description

@AlanGanem

Please explain clearly what you'd like to see added.

When working with Hierarchichal and Groupped time series, i've stumbled uppon some common issues:

  1. usually for GTS and HTS, the time series for all groups are in the same dataframe, requiring the shift operations to be performed in a groupwise fashion.
  2. there might be some missing data for specific days, which makes the naive operation for lagged (using pd.shift) features incossistent.
  3. you may want to create resampled (downsampled) lagged features, preserving the default data frequency (like having daily prediciton using last week mean as a feature, for instance)

I already have this implemented as a function.

  • convince us of the use-case, we're open to many suggestions but we prefer to solve problems with pipelines that are at least somewhat general
  • add a screenshot if applicable (ML stuff is hard to explain with words, pictures say 1000 words)
  • make sure that the feature you want is not already supported by sklearn

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions