| ... | ... | @@ -93,7 +93,7 @@ As an alternative path, we can follow the probabilistic learning to alleviate th |
|
|
|
y_p(x, w) = w_0 + w_1x_1 + . . . + w_ix_i
|
|
|
|
```
|
|
|
|
|
|
|
|
In the probabilistic world, the trainable parameters (w) will be represented by probability distributions, represented by Gaussians. These initial statements act like prior knowledge on the fitting. In the next step, we update our PDFs via Bayesian update, obtaining the posterior distributions --again as Gaussians (we love Gaussians as it is very easy to work with them: combining Gaussians will yield a new Gaussian distribution). By examining new cases (training data), we can build up a better understanding of the system behavior iteratively in this probabilistic landscape.
|
|
|
|
In the probabilistic world, the trainable parameters (w) will be represented by probability distributions, defined by Gaussians. These initial statements act like prior knowledge on the fitting. In the next step, we update our PDFs via Bayesian update, obtaining the posterior distributions --again as Gaussians (we love Gaussians as it is very easy to work with them: combining Gaussians will yield a new Gaussian distribution). By examining new cases (training data), we can build up a better understanding of the system behavior iteratively in this probabilistic landscape.
|
|
|
|
|
|
|
|
Let's look at a simple, 2D case. In the linear model, we know have only two trainable parameters:
|
|
|
|
|
| ... | ... | @@ -104,12 +104,14 @@ Herein, we will represent the the probabilities for the weights in terms of Gaus |
|
|
|
|
|
|
|
<img src="uploads/c785c19d15ea93d24d4ca41e01bf9848/br1.png" width="600">
|
|
|
|
|
|
|
|
At this stage, the model is not trained at all. What happens as we see examples? Lets show the model the very first example (blue circle below). In the Bayesian learning, we use the likelihood function, p(y|x,w) -- probability of getting the true y value given the weights and the example. With the example we pass, the calculated likelihood is shown below (left). The true weights are shown as "+" for comparison. Here, the calculated likelihood estimates that the weights of the model should be around this zone. By using the likelihood and our prior, we now calculate the posterior probabilities, given in the middle:
|
|
|
|
Here on the right, you can see lines drawn by using the weight probabilities given in the middle. As you can see, they do not agree on a solution. This is expected as at this stage, the model is not trained at all.
|
|
|
|
|
|
|
|
What happens as we see examples? Lets show the model the very first example (below, blue circle on the right plot). In the Bayesian learning, we use the likelihood function, p(y|x,w) -- probability of getting the true y value given the weights and the example. With the example we pass, the calculated likelihood is shown below (left). The true weights are shown as "+" for comparison. Here, the calculated likelihood estimates that the weights of the model should be around this zone. By using the likelihood and our prior (middle figure before seeing any data), we now calculate the posterior probabilities, given in the middle:
|
|
|
|
|
|
|
|
<img src="uploads/056765b94996330d69d7dc932f5576b0/br2.png" width="600">
|
|
|
|
|
|
|
|
|
|
|
|
Samples of models withdrawn from the posterior distribution is given on the right. Here we see that the lines start to accumulate around the observation already.
|
|
|
|
Samples of models withdrawn from the posterior distribution is given on the right. Here we see that the lines start to accumulate around the observation already (they start to agree one another).
|
|
|
|
|
|
|
|
In the next step, we pass another observation. The likelihood function for the second observation is given on the left. This is then multiplied with the current prior (previously calculated posterior) and normalized, giving the new posterior distribution in the middle:
|
|
|
|
|
| ... | ... | |
| ... | ... | |