darts icon indicating copy to clipboard operation
darts copied to clipboard

beta-NLL

Open gdevos010 opened this issue 2 years ago • 3 comments

Is your feature request related to a current problem? Please describe. beta-NLL from the paper "On the Pitfalls of Heteroscedastic Uncertainty Estimation with Probabilistic Neural Networks"

Describe proposed solution We could create a new likelihood

or

It could be added to the _nlloss() method https://github.com/unit8co/darts/blob/155c653a5243af3dd56faad9ffa539bd58c8e050/darts/utils/likelihood_models.py#L126-L132

gdevos010 avatar May 24 '22 19:05 gdevos010

Nice! Seems like a great addition indeed. Adding to the backlog. It can perhaps be implemented by accepting an optional beta parameter in the GaussianLikelihood.

hrzn avatar May 26 '22 08:05 hrzn

Nice! Seems like a great addition indeed. Adding to the backlog.

hrzn avatar May 26 '22 08:05 hrzn

I think it would look something like this

nll = -out_distr.log_prob(target).mean() 
if self.beta > 0.0:
    variance = out_distr.variance
    nll = nll * (variance.detach() ** self.beta)
return nll

gdevos010 avatar May 27 '22 19:05 gdevos010