Docsity

Linear Regression and Adaline Algorithm: Learning Weights for Signal Prediction, Slides of Advanced Computer Architecture

Partial preview of the text

Download Linear Regression and Adaline Algorithm: Learning Weights for Signal Prediction and more Slides Advanced Computer Architecture in PDF only on Docsity!

Recap

We have been considering learning linear models forclassification and regression.

PR NPTEL course – p.1/

Recap

We have been considering learning linear models forclassification and regression.

Perceptron is a classical algorithm for learning linearclassifiers.

PR NPTEL course – p.2/

Recap

We have been considering learning linear models forclassification and regression.

Perceptron is a classical algorithm for learning linearclassifiers.

It can learn a separating hyperplane if the data islinearly separable.

We have also discussed learning linear models usingleast squares method.

PR NPTEL course – p.4/

Recap

We have been considering learning linear models forclassification and regression.

Perceptron is a classical algorithm for learning linearclassifiers.

It can learn a separating hyperplane if the data islinearly separable.

We have also discussed learning linear models usingleast squares method.

This is a general method applicable for learning inboth classification and regression problems.

PR NPTEL course – p.5/

Linear Regression

Given training data:

X

i

, y

i

, i

, n

,

X

i

d

, y

i

i

.

The objective is to learn a linear model:

y

X

f

X

W

T

X

w

0

PR NPTEL course – p.7/

Linear Regression

Given training data:

X

i

, y

i

, i

, n

,

X

i

d

, y

i

i

.

The objective is to learn a linear model:

y

X

f

X

W

T

X

w

0

(or,

f

X

W

T

X

, when using augumented vectors).

PR NPTEL course – p.8/

The criterion is to minimize mean square error:

J

W

n

i

=

W

T

X

i

y

i

2 PR NPTEL course – p.10/

The criterion is to minimize mean square error:

J

W

n

i

=

W

T

X

i

y

i

2

We saw that the minimizer of

J

is given by

W

∗

A

T

A

−

1

A

T

Y

where

A

is a

n

×

d

matrix whose rows are the

X

i

and

Y

is

n

×

vector whose components are

y

i

.

PR NPTEL course – p.11/

We also considered a gradient descent method forfinding the minimizer of

J

.

We saw the LMS algorithm which is an incrementalvariant of the gradient descent method.

PR NPTEL course – p.13/

We also considered a gradient descent method forfinding the minimizer of

J

.

We saw the LMS algorithm which is an incrementalvariant of the gradient descent method.

We consider this in more detail now.

PR NPTEL course – p.14/

LMS algorithm

We are finding

W

∗

that minimizes

J

W

n

i

=

X

T i

W

y

i

2

We could have found the minimum through aniterative scheme using gradient descent.

PR NPTEL course – p.16/

LMS algorithm

We are finding

W

∗

that minimizes

J

W

n

i

=

X

T i

W

y

i

2

We could have found the minimum through aniterative scheme using gradient descent.

The gradient of

J

is given by

J

W

n

i

=

X

i

X

T i

W

y

i

PR NPTEL course – p.17/

The iterative gradient descent scheme would be

W

k

W

k

η

n

i

=

X

i

X

T i

W

k

y

i

In analogy with what we saw in Perceptron algorithm,this can be viewd as a ‘batch’ version.

PR NPTEL course – p.19/

The iterative gradient descent scheme would be

W

k

W

k

η

n

i

=

X

i

X

T i

W

k

y

i

In analogy with what we saw in Perceptron algorithm,this can be viewd as a ‘batch’ version.

We use the current

W

to find the errors on all training

data and then do all the ‘corrections’ together.

PR NPTEL course – p.20/