deepar icon indicating copy to clipboard operation
deepar copied to clipboard

can you use categorical data in dynamic features ?

Open Sandy4321 opened this issue 5 years ago • 3 comments

can you use categorical data in dynamic features ? vs paper https://arxiv.org/pdf/1704.04110.pdf One challenge often encountered when attempting to jointly learn from multiple time series in realworld forecasting problems is that the magnitudes of the time series differ widely, and the distribution of the magnitudes is strongly skewed.

Sandy4321 avatar Jul 26 '20 22:07 Sandy4321

I don't understand your question. I don't see how your question relates to your citation. I will answer separately.

can you use categorical data in dynamic features ?

If you have low cardinality categories they can be represented by one-hot-encoding, otherwise, by jointly trained embeddings.

One challenge often encountered when attempting to jointly learn from multiple time series in realworld forecasting problems is that the magnitudes of the time series differ widely, and the distribution of the magnitudes is strongly skewed.

You can attempt to normalize them for ease of convergence during training and handle the inverse operation as a post inference step. Although pure normalization won't completely solve skewness, you would need some kind of transformation.

brunoklein99 avatar Jul 26 '20 22:07 brunoklein99

thanks for soon answer If you have low cardinality categories they can be represented by one-hot-encoding, otherwise, by jointly trained embeddings may you share code example of such a use? you definitely may have it , since categorical data is often to meet in real live cases

Sandy4321 avatar Jul 27 '20 16:07 Sandy4321

  1. https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.OneHotEncoder.html
  2. https://pytorch.org/docs/master/generated/torch.nn.Embedding.html

brunoklein99 avatar Jul 27 '20 19:07 brunoklein99