algorithm - Verifying a Perceptron Learning Example -
i trying understand perceptron learning algorithm via example presented professor. here understanding. can 1 check if understanding correct?
lets have inputs
x1 x2 result(y)
1 3 +1
-1 -2 -1
1 -1 1
-2 1 -1
now use below algorithm weights
w0=0
1)y1(w0x1)<=0
hence w1=w0+y1*x1=[1,3]
2)y2(w1,x2)<=0
hence w2=w1+y2*x2=[3,-1]
3)y3(w2,x2)>=0
hence no iteration
4)y4(w2,x4)<=0
hence w3=w2+y4*x4=[5,-2]
hence weights
x1 x2 result(y) weights
1 3 +1 [1,3]
-1 -2 -1 [3,-1]
1 -1 1 [3,-1]
-2 1 -1 [5,2]
is understanding right?or making mistake weights selection /or mistake while making iteration .
it looks did correct, there number of comments:
you state that, initially, w0 = 0. not make sense, later add vectors of dimension 2. i'm guessing meant w0 = [0, 0].
fyi:
a more general perceptron learning algorithm not add/subtract misclassified instances, rather scaled version multiplied 0 < α ≤ 1. algorithm above uses α = 1.
it's common artificially prepend perceptron inputs, constant 1 term. hence, if original inputs vectors of dimension 2, you'd work on vectors dimension 3, first item of each vector 1.
Comments
Post a Comment