moment-timeseries-foundation-model / moment

MOMENT: A Family of Open Time-series Foundation Models
https://moment-timeseries-foundation-model.github.io/
MIT License
297 stars 47 forks source link

How can I model time series shorter than 512 timesteps? #22

Closed Evelyn998ee closed 1 month ago

Evelyn998ee commented 3 months ago

Hi! Thanks to your excellent work! I would like to ask can I make the initial time length of the pretrained model less than 512? Because the time length of my data is much less than 512, I worry that too much padding will prevent the model from extracting valid features.

Thank you in advance.

mononitogoswami commented 1 month ago

Hi Evelyn, Can you tell us a bit more about the data?

There's a few ways you can upsample your time series. If the shape of your time series is important, and not its temporal resolution MOMENT research (https://github.com/moment-timeseries-foundation-model/moment-research) code has some up sampling functions such as cubic spline interpolation, which might be helpful.

Also note that MOMENT takes input_mask as input. You can "mask" the padded values so that the model does not pay attention to them. One thing to be careful here is that patches which are partially observed (i.e. some time stamps are observed while others are padded or masked) are completely masked, so there might be some loss of information. This may be important for extremely short time series where all time stamps are equally important.

Let us know if you have any more questions and thanks for your interest in MOMENT!

Don't hesitate to open another issue should you have one.

Best, Mononito