brunoklein99 / deepar

An Implementation of DeepAR: Probabilistic Forecasting with Autoregressive Recurrent Networks
34 stars 8 forks source link

can you use categorical data in dynamic features ? #1

Open Sandy4321 opened 4 years ago

Sandy4321 commented 4 years ago

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.

brunoklein99 commented 4 years ago

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.

Sandy4321 commented 4 years ago

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

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