piEsposito / blitz-bayesian-deep-learning

A simple and extensible library to create Bayesian Neural Network layers on PyTorch.
GNU General Public License v3.0
918 stars 107 forks source link

Model predictions and uncertainty #97

Open asadabbas09 opened 2 years ago

asadabbas09 commented 2 years ago

Thanks, @piEsposito for the amazing library.

I'm using a couple of Bayesian linear layers at the end of a model for regression analysis.

One thing that I noticed is that I have a few samples (within the red circle) with a large prediction error but the model is very certain about these predictions. Wouldn't it make more sense if the model had predicted these samples with large error bars (i.e. high uncertainty)?

I'm using n_samples = 25 when computing std and means during inference.

Is there a way to have high uncertainty for such predictions?

image