Giter Club home page Giter Club logo

bayesian_uncertainty's Introduction

Bayesian Uncertainty Baselines for Regression

In this repository we provide baselines to evaluate uncertainty in regression problems.

We provide 11 datasets, 3 uncertainty metrics, 3 deep models, 7 shallow models, and an uncertainty calibration routine.

Models

  1. Multilayer Perceptron
  • Regular (homoskedastic)
  • Bayesian dropout
  • Two outputs: mean and stddev, learning with log-likelihood loss function
  1. Extreme gradient boosting
  • Regular (homoskedastic)
  • Tree variance as stddev
  • Two outputs: mean and stddev, learning with log-likelihood loss function
  1. Random forest
  • Regular (homoskedastic)
  • Tree variance as stddev
  1. Linear (both homoskedastic)
  • Linear regression
  • Bayesian linear regression

Uncertainty calibration

Uncertainty calibration is a procedure where we calibrate the uncertainty on a validation set in order to maximize the predictive log likelihood (normal distribution):

$calibrated_mean = mean + \alpha$ $calibrated_stddev = stddev * \beta$

Where $\alpha$ and $\beta$ are learned in a validation set. If there are multiple validation sets (e.g. cross-validation), we average the calibrated_mean and calibrated_stddev to make the final predictions.

Datasets

We provide 10 UCI regression datasets typically used in the bayesian deep learning literature plus one extra large dataset (flight delays).

Metrics

  1. NLPD (negative log predictive distribution) of a normal distribution (sometimes knows as negative log likelihood)
  2. RMSE (root mean squared error)
  3. Area under curve of the RMSE (each point of the curve is the RMSE with the top X% most uncertain samples removed from the test set)
  4. Normalized area under curve of the RMSE (normalized by the RMSE itself)

Results (work in progress)

  1. Shallow models make very strong baselines both in RMSE and NLPD, even compared with the state of the art literature
  2. Heteroskedastic variance is almost always more useful than homoskedastic, no matter the method or model

Install

  1. Clone the repo locally
  2. Go to its directory
  3. Install with:
pip install -e .
  1. To run a script: python scripts/shallow_experiments.py

bayesian_uncertainty's People

Contributors

tabacof avatar ramon-oliveira avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.