Linear - Regression
Linear - Regression
https://www.scribbr.com/statistics/linear-regression-in-r/
2
A simple regression model
3
An example
4
Linear regression with nonlinear basis functions
where and
6
Examples of basis functions
• Polynomial basis function: taking the form of powers of 𝑥
7
How basis functions work
8
Maximum likelihood and least squares
9
Maximum likelihood and least squares
where
10
Maximum likelihood and least squares
How?
where
11
Maximum likelihood and least squares
12
Maximum likelihood and least squares
13
Maximum likelihood and least squares
we have
• How to derive?
➢ Hint 1:
➢ Hint 2:
14
Maximum likelihood and least squares
• The ML solution
15
Maximum likelihood and least squares
where
• We get
16
Regression for a new data point
17
Regularized least squares
18
Regularized least squares
19
Multiple outputs
20
Multiple outputs
21
Multiple outputs: Maximum likelihood solution
22
Sequential learning
23
Sequential learning
24
Maximum a posterior
• Likelihood function
26
A zero-mean isotropic Gaussian prior
27
Sequential Bayesian learning: An example
28
An example
• Regression function
29
An example
• Regression function
• In the beginning, no
data are available
• Constant likelihood
• Prior = posterior
30
An example
• Regression function
• Regression function
• Regression function
where and
• Then we have
• where
34
• Green curve is used to sample data. It is unknown
• Blue circle: a sampled data
• After learning, the predictive distribution
37
References
38
Thank You for Your Attention!
39