Bayesian Regression - Introduction (Part 1)¶

The goal of linear regression is to fit a function to the data of the form:

\[y = w X + b + \epsilon\]

where \(w\) and \(b\) are learnable parameters and \(\epsilon\) represents observation noise. Specifically \(w\) is a matrix of weights and \(b\) is a bias vector.

In this tutorial, we will first implement linear regression in PyTorch and learn point estimates for the parameters \(w\) and \(b\) . Then we will see how to incorporate uncertainty into our estimates by using Pyro to implement Bayesian regression. Additionally, we will learn how to use the Pyro’s utility functions to do predictions and serve our model using TorchScript .

Tutorial Outline¶