Skip to content

Extended time series regularizer to support multiseries #4303

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

Merged
merged 11 commits into from
Sep 14, 2023
Merged

Conversation

MichaelFu512
Copy link
Contributor

@MichaelFu512 MichaelFu512 commented Sep 11, 2023

Pull Request Description

Extended time series regularizer to support multiseries
Closes #4304

Example of what this does

Let's say you have an unstacked X:

Screen Shot 2023-09-12 at 12 21 07 PM

Where "2018-01-11", "2018-01-12" and "2018-01-16" are missing.

And you have an unstacked y:
Screen Shot 2023-09-12 at 12 23 18 PM

Which is missing the values that correspond to the missing dates from X_unstacked (values jumps from 49 -> 60 and 74 -> 80).

If you call TimeSeriesRegularizer on X and y:
Screen Shot 2023-09-12 at 12 25 37 PM

y will now regularize into:

Screen Shot 2023-09-13 at 12 39 02 PM

Works also for duplicate datetimes, extra datetimes, and misaligned datetimes.


After creating the pull request: in order to pass the release_notes_updated check you will need to update the "Future Release" section of docs/source/release_notes.rst to include this pull request by adding :pr:123.

@MichaelFu512 MichaelFu512 changed the title extended time series regularizer Extended time series regularizer Sep 11, 2023
@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Patch coverage: 100.0% and project coverage change: +0.1% 🎉

Comparison is base (cc60b68) 99.7% compared to head (e90a7ea) 99.7%.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4303     +/-   ##
=======================================
+ Coverage   99.7%   99.7%   +0.1%     
=======================================
  Files        357     357             
  Lines      39694   39739     +45     
=======================================
+ Hits       39574   39619     +45     
  Misses       120     120             
Files Changed Coverage Δ
...nsformers/preprocessing/time_series_regularizer.py 100.0% <100.0%> (ø)
...ts/component_tests/test_time_series_regularizer.py 100.0% <100.0%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MichaelFu512 MichaelFu512 changed the title Extended time series regularizer Extended time series regularizer to support multiseries Sep 12, 2023
Copy link
Contributor

@eccabay eccabay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're going to need more testing, but the impl itself is solid!

Copy link
Collaborator

@jeremyliweishih jeremyliweishih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick refactor but otherwise LGTM.

Copy link
Contributor

@eccabay eccabay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small comments, but nothing blocking. The tests are much cleaner now, thank you!

@MichaelFu512 MichaelFu512 merged commit 79a3200 into main Sep 14, 2023
@MichaelFu512 MichaelFu512 deleted the TML-8378 branch September 14, 2023 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend Time Series Regularizer to support multiseries
4 participants