Hey Folks, I was just trying to understand the Pytorch Embedding layers. I am creating an time-series prediction model using an LSTM, but I also have some categorical information that I want to include in the model. I have some time series variables, such as the year, month, week number, and day, as well as some spatial variables including US State and county number.
Now, I was wondering if I have to create separate embedding layers for each categorical column, or can I just create a single embedding to cover all of the categorical columns? More specifically, do I need to create a separate embedding column for the year, then a separate one fr the month, and then one for the week, and day. In this case, then I would need to concatenate all of those layers to pass them to a fully connected layer or something.
Or can I just keep the (year, month, week number, and day) as the matrix that I input into the embedding layer? In other words, does the pytorch implementation of Embedding layers handle having these multiple columns as represented by a single output embedding matrix?
Hopefully my question is clear, but please let me know if I need to clarify anything. I just wanted to understand how to best use these embeddings for categorical features. Thanks.