Professional Documents
Culture Documents
ML Unit - V
ML Unit - V
ML Unit - V
Unit - V
By
Mrs. P Jhansi Lakshmi
Assistant Professor
Department of CSE, VFSTR
Syllabus
UNIT – V
MULTILAYER PERCEPTRON: Understanding the brain; Neural
networks as a paradigm for parallel processing; The perceptron;
Training a perceptron; Learning boolean functions; Backpropagation
algorithm; Nonlinear regression; Two class discrimination; Multiclass
discrimination; Multiple hidden layers; Training procedures; Improving
convergence; Overtraining; Structuring the network.
• Where and are augmented vectors to include the bias weight and input.
y y
s y
w0 w0
w w
x
w0
x x
x0=+1
1
y sigmoid o
1 exp w T x
The Perceptron
• During testing, with given weights, w, for input x, we compute the output y.
• To implement a given task, we need to learn the weights w, the parameters of the
system, such that correct outputs are generated given the inputs.
• When d = 1and x is fed from the environment through an input unit, we have
which is the equation of a line with as the slope and as the intercept.
• Thus this perceptron with one input and one output can be used to implement a linear
fit.
• With more than one input, the line becomes a (hyper)plane, and the perceptron with
more than one input can be used to implement multivariate linear fit.
K Outputs y i w ij x j w i 0 w x
T
i
j 1
y Wx
Classification:
oi w Ti x
expoi
yi
k expok
choose C i
if y i max y k
k
20
Training a Perceptron
• The strategy of training a perceptron is based on processing sample
instances is one by one vs batch (whole sample) learning:
• No need to store the whole sample
• Training strategy:
• Start from random initial weights.
• Update the weights in each iteration to minimize the error (use gradient descent if
the error function is differentiable)
• Repeat many times
H
y i v z v ih zh v i 0
T
i
h 1
zh sigmoid w Th x
1
1 exp
d
j 1
w hj x j w h 0
E E y i zh
w hj y i zh w hj
v h r t y t zht
H
y v z v0
t t
h h t
h 1
Backward
E
Forward w hj
w hj
zh sigmoid w x T
h
E y t zht
t t
t y z h w hj
r t y t v h zht 1 zht x tj
t
x r t y t v h zht 1 zht x tj
t
yi
E W,V | X ri y i
1 t t 2
2 t i
H vih
y v z v i 0
t
i
t
ih h
h 1
r y z
zh
v ih i
t t
i
t
h
t whj
t
w hj ri y i v ih zh 1 zht x tj
t t xj
t i
P(C2|xt) ≡ 1-yt
H
y sigmoid v h zh v 0
t t
h1
E W, v | X r t log y t 1 r t log 1 y t
t
v h r t y t zht
t
w hj r t y t v h zht 1 zht x tj
t
t
o
H
exp
oit v ih zht v i 0 y it i
P C | x t
k exp okt i
h 1
v ih rit y it zht
t
t
w hj ri y i v ih zh 1 zht x tj
t t
t i
d
z1h sigmoid w x sigmoid w1hj x j w1h 0 , h 1,..., H1
T
1h
j 1
H1
z 2 l sigmoid w z sigmoid w 2 lh z1h w 2 l 0 , l 1,..., H2
T
2l 1
h1
H2
y vT z 2 vl z2l v0
l 1