-
Notifications
You must be signed in to change notification settings - Fork 881
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
Feat/MIDAS transformer #1820
Feat/MIDAS transformer #1820
Conversation
…series through 'ts_transform()'
…series through 'ts_transform()'
…like they should in case of a MIDAS transformation.
…for every quarter instead of there being some missing months, also changed the docstring a bit such that it works with the debugger
@madtoinou I just included the strip argument for convenience, however it indeed can lead to unexpected behaviour. More fool-proof to remove that argument, agreed! Thank you very mich for finishing this job and doing at such an impressive pace! |
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1820 +/- ##
==========================================
+ Coverage 93.85% 93.90% +0.05%
==========================================
Files 134 135 +1
Lines 13123 13283 +160
==========================================
+ Hits 12317 12474 +157
- Misses 806 809 +3 ☔ View full report in Codecov by Sentry. |
…the anchor value.
6ea8ba4
to
68cfa01
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some updates:
- probabilistic supports
- leverage sliding windows for MIDAS.transform() instead of iterating through the dataframe
- reduce upsampling to a minumum
Thanks again and congrats for this @Beerstabr and @madtoinou!
It was a long way, but now it's ready to be merged :) 💯 🚀
Fixes #1570.
Summary
Based on @Beerstabr PR #1668, simplified some part of the code and made the transformer invertible.
The original high frequency is imputed based on the number of component introduced by the
transform()
method and the low frequency name (which is used to generate apd.Timedelta
). We could also allow the user to hint the target frequency by adding an argument to the function.When the ratio between the low and the high frequency is not a fixed number (number of days in a quarter for example, after doing from months to quarter), the code relies on a rule-based logic. For anchored offset (
W-SUN
for example), the start time of the returnedTimeSeries
is not always identical to the originalTimeSeries
so I added anoffset
argument to allow the user to adjust for itOther Information
Not sure if the
strip
parameter should be set toTrue
by default or even part of the transform as it can induce counter-intuitive results. @Beerstabr, did you include it for any specific reason?