Hi, @deeplearner20
That’s an interesting question.
Commonly one uses RNNs to predict the next value in a row and it is trained on ground truth sequences to extract patterns from the context. It is definitely OK to try to predict the N-th day temperature based on the sequence of the previous N-1 values with LSTM.
If you trying to fit a LSTM network on months for examples that are not in order (i.e. March, May, February, May) that won’t make sense to try to obtain a pattern from that data. If you are trying to train it on ordered months, that would be overkill because you can predict the following month without a model.
As for me your task is looks like regression task that might involve some other methods like decision trees or linear regression. You can pass there your categorical variables and add there (as a separate feature) the embedding of temperatures. The embedding might be the following: train LSTM on ordered by time sequences of 4 temperatures to predict the 5th following, add the embedding of these 4 temperatures to your regression model. And don’t forget to avoid data leak, embedding shouldn’t be based on the temperature of the record you try to predict.
Hope my thoughts will be helpful