I am implementing LSTM to a time series prediction which requires predicting both the expected value (i.e. the mean of the prediction), and the standard deviation (i.e. the interval that the future value should fall into).
I have considered that one-hot encoding can return the possibility of the prediction of each category, which can then be used to both find the mean and the S.D. of the prediction, for example if the output of the LSTM is
- Category | Possibility
- [0,5) | 0.1
- [5,10) | 0.2
- [10,15) | 0.4
- [15,20) | 0.3
I then conclude that the expected value of the prediction is (2.5x0.1 + 7.5x0.2 + 12.5x0.4 + 17.5x0.3 = 12)
and the S.D. is find in the similar manner.
My question is, is this method a valid method to find the mean and the S.D. of the prediction, why / why not?