Open SPOREIII opened 4 years ago
@SPOREIII I've changed this to your formula. Please check.
Thanks for the question. This is a very old repo, but @benman1 did a great job cleaning up the mess recently. Regarding the loss function: the one previously used was wrong of course, and needs to be corrected according to what you are reporting above. As further discussion topic, we may consider using the new probabilistic layers introduced with Tensorflow Probability here , where they use a simple lambda
function to directly reference the negative log likelihood of a Gaussian distribution: negloglik = lambda y, rv_y: -rv_y.log_prob(y)
. In this case we would not even need to express the likelihood explicitly
The loss function of the Gaussian distribution given in the code is as follows:
I think it can be expressed as the following mathematical formula: But according to the formula in the original text(DeepAR: Probabilistic Forecasting with Autoregressive Recurrent Networks), I derived the following result: I don't know where I got it wrong and I cannot get the loss function form given in the code.