awslabs/gluonts

add millisecond L and microsecond U support in `time_feature`

hohe12ly opened this issue · 1 comments

Description

Currently, the finest temporal resolution (frequency) that the base module and the lag and seasonality module in time_feature is secondly (S). Is it straightforward to add millisecond and microsecond? Pandas tseries support these two frequencies (L and U).

It seems to support millisecond and microsecond resolutions, the following codes need to be extended:

  • time_feature/_base.py:
    • add milli_of_second(), micro_of_second(), and possibly micro_of_milli()
    • change time_features_from_frequency_str() accordingly.
  • time_feature/lag.py:get_lags_for_frequency()
    • add _make_lags_for_millisecond(), _make_lags_for_microsecond()
    • add 'L' and 'U' support
  • time_feature/seasonality.py: add L and U support in DEFAULT_SEASONALITIES

If it is more complicated than that, could you please explain a bit? Thanks.

References

@hohe12ly indeed can you kindly send a PR?