We already derive the posterior update formula for Bayesian regression here, telling us that it is distribution of our parameter regression given data set . We are not directly interested in the value of , but, we are interested in the value of itself given new value of new . This is exactly same with regression problem, given new value , we want to predict output value of , which is in continuous value mode. And we already did linear regression problem using LSE (Least Square Error) here. During this post, we will do regression from Bayesian point of view. Using Bayesian in regression, we will have additional benefit. We will see later in the end of this post.

From #Part1 here, we already get . To do regression in Bayesian point of view, we have to derive predictive distribution, so that we will have probability of , . We can achieve that by doing marginalization. Here we go.

where is likelihood and is posterior we derive here

Equation above is rule of sum (term used in Bishop text, or also called law of total probability) in Bayesian formula. Parameters in our likelihood is , and for our posterior are . Let’s write in our equation first.

Form equation above, let’s complete our derivation.

We will use similar technique we already used before in multiplying two Gaussians, which is “completing the square”. But, because our probability is , we need to collect the terms regarding coefficients, not . To do this, we have to modify a little bit. Let , and .

We know that , since it’s a Gaussian probability distribution. Thus, our last formula becomes:

We will remove since we don’t really care constant value in Gaussian probability. Parameters we care are only mean and variance, and once we get them, the Gaussian function is already normalized (integrates to 1). Putting and we defined before, we get:

The last line we get because is symmetric so thatÂ . And . Proceeding our derivation, we get:

In last formula above we already successfully gather term coefficients regarding . Let’s do “completing the square” now. Our new probability .

By comparing coefficient in , we can get our .

And by comparing coefficient in , we can get our .

We still have to calculate , where . By using Sherman-Morrison formula, . Doing some algrebra operations, our and become:

4 thoughts on “Bayesian Linear / Polynomial Regression #Part2: Deriving Predictive Distribution”

Hi, just to tell you that at the end, the new Lambda is equal to 1/a + x^T Lambda^(-1) x (and the first x should not be bold in my opinion). Otherwise, great explanations !

Hi,
This post talks about predictive distribution which already estimates a scalar value of output prediction (), and the upper & lower bound of predictive distribution represented by a scalar value of prediction variance (). The learning parameters () are not scalar values, they are derived here: https://ardianumam.wordpress.com/2017/10/21/bayesian-linear-regression/ where the prior probability model uses zero mean isotropic Gaussian. So, the in in this post is also bold, cz it is a desgin matrix, which is not a scalar value. For more detail, you can check Bishop textbook, page 153 and 156.

I am sure about this since I already implement it in a code, and the output is correct (makes sense compared with corresponding result in Bishop textbook).

According to my research, after a in foreclosure home is bought at a sale, it is common for that borrower to be able to still have any remaining balance on the mortgage loan. There are many loan providers who try to have all expenses and liens paid back by the next buyer. Having said that, depending on a number of programs, laws, and state laws and regulations there may be several loans which aren’t easily solved through the shift of personal loans. Therefore, the responsibility still lies on the borrower that has had his or her property in foreclosure. Many thanks for sharing your notions on this blog.

Hi, just to tell you that at the end, the new Lambda is equal to 1/a + x^T Lambda^(-1) x (and the first x should not be bold in my opinion). Otherwise, great explanations !

Also the x for the new mu should not be bold, then you obtain the scalar which correspond to the approximation of y.

Hi,

This post talks about predictive distribution which already estimates a scalar value of output prediction (), and the upper & lower bound of predictive distribution represented by a scalar value of prediction variance (). The learning parameters () are not scalar values, they are derived here: https://ardianumam.wordpress.com/2017/10/21/bayesian-linear-regression/ where the prior probability model uses zero mean isotropic Gaussian. So, the in in this post is also bold, cz it is a desgin matrix, which is not a scalar value. For more detail, you can check Bishop textbook, page 153 and 156.

I am sure about this since I already implement it in a code, and the output is correct (makes sense compared with corresponding result in Bishop textbook).

According to my research, after a in foreclosure home is bought at a sale, it is common for that borrower to be able to still have any remaining balance on the mortgage loan. There are many loan providers who try to have all expenses and liens paid back by the next buyer. Having said that, depending on a number of programs, laws, and state laws and regulations there may be several loans which aren’t easily solved through the shift of personal loans. Therefore, the responsibility still lies on the borrower that has had his or her property in foreclosure. Many thanks for sharing your notions on this blog.