kashif/pytorch-transformer-ts

Does Autoformer support num_feat_dynamic_cat input?

sysublackstar opened this issue · 4 comments

I found input variable contains num_feat_static_cat and num_feat_dynamic_real of Autoformer, does it support num_feat_dynamic_cat input?

Hope for your answer!

@sysublackstar none of the models support dynamic cat inputs as I have never found any open time series data with such features... do you have an example in mind?

Thanks for your reply. My dataset contains a feature named Holiday, which means the kind of holiday on that date.Holiday can be categorized as such feature. I want to use this feature as input so that the model can better learn the trend around holidays. As for the open source data set, I have not seen it yet too😂

@sysublackstar for holiday features I typically take the "bed of nail" events and add smoothing to them which makes them real valued dynamic features. This way the network knows when a holiday is approaching and when it has gone and you can control the smoothness of these features. Thus this can be done at the time when making the dataset.

have a look at how i did it for the M5 dataset here:

https://github.com/zalandoresearch/pytorch-ts/blob/master/pts/dataset/repository/_m5.py#L60-L62

hope that helps!

Yeah, that helps a lot! The first time I'd heard of this way to process holiday features.

Thank you again!