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

Accept timedelta window_size in cutoff_window_sequences #239

Closed
csala opened this issue Jul 21, 2020 · 0 comments · Fixed by #240
Closed

Accept timedelta window_size in cutoff_window_sequences #239

csala opened this issue Jul 21, 2020 · 0 comments · Fixed by #240
Assignees
Labels
primitive improvement An improvement over an existing primitive
Milestone

Comments

@csala
Copy link
Contributor

csala commented Jul 21, 2020

The primitive mlprimitives.custom.timeseries_preprocessing only accepts integers as window_size specification:

https://github.com/HDI-Project/MLPrimitives/blob/a592c8446aa614cd9d0eb6c73735d11ebc876129/mlprimitives/custom/timeseries_preprocessing.py#L216

This should be made flexible, so pd.Timedelta objects or the corresponding str specifications can be passed.

As an example, if an X is passed where the time index has a regular frequency of one hour (so, there are 24 data points every day), all these window_size values should be equivalent:

  • 24
  • '24h'
  • '1d'
  • pd.Timedelta(hours=24)
  • pd.Timedelta(days=1)
@csala csala added the primitive improvement An improvement over an existing primitive label Jul 21, 2020
@csala csala added this to the 0.2.5 milestone Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
primitive improvement An improvement over an existing primitive
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants