feat: Added frequency aware one-hot and relative cyclic encoding.#2893
feat: Added frequency aware one-hot and relative cyclic encoding.#2893konsram wants to merge 4 commits intounit8co:masterfrom
Conversation
|
@dennisbader What do you think about the new options for encodings mentioned in (1) and (2)? Do you think changing the information provided to SingleEncoders is a viable approach for (3) and (4)? Regarding my comment in #2842: Currently I am using the raw values, what do you think about this? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2893 +/- ##
==========================================
- Coverage 95.27% 95.12% -0.15%
==========================================
Files 146 146
Lines 15588 15640 +52
==========================================
+ Hits 14851 14878 +27
- Misses 737 762 +25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@dennisbader, what do you think about the proposed changes, especially making the encoders aware of a time series' frequency and start? Do you see any drawbacks to this approach? |
689c116 to
b1149e7
Compare
85905ac to
7e7fa62
Compare
…new default behavior.
…ike business days.
Checklist before merging this PR:
Fixes #2842 .
Summary
Changes in this PR give users more options for encoding datetime attributes. This includes:
daywas encoded relative to the number of days in a month, while other attributes with a variable maximum (dayofyear,day_of_year,week,weekofyear,week_of_year) were encoded relative to the maximum on the specified time index.minute). Useres are now given the option to use a frequency aware one-hot-encoding. The frequency aware option considers the start of the time index and the frequency of the index to determine possible values (e.g.(0, 15, 30, 45)when start is noramlized for an hour and frequency is15min). This reduces the number of covariates, which may be critical for models who can't handle high dimensional feature spaces.OneHotTemporalEncoderclass, which uses the functionality from (2) and integrates intoSequentialEncoder. This requires changing the attributes available toSingleEncoder(encoders must be aware of the frequency and start time of the data).CyclicTemporalEncoderto reflect the changes in (1).Other Information
Draft Progress
OneHotTemporalEncoderCyclicTemporalEncoder