2012年11月7日 星期三

The Perceptron Learning Algorithm

The perceptron learning algorithm (PLA) is implemented by Matlab I create our own target function and artificial data set to see how PLA works. I take dimension of problem as 2 to visualize the problem, and choose the a random line as our target function f, where one side of the line maps to +1 and the other maps to -1. Choose the inputs Xn (bolder means vector) of the data set as random points in the plane, and evaluate the target function on each xn to get corresponding output Yn. Take N =10 and 100, repeat the experiment 1000 times and take the average. f: target function. g: hypothesis.