
2.2 The Perceptron Algorithm 33
Table 2.1 Number of Iterations Performed by the Perceptron
Algorithm in Example 2.2.1
X
1
X
2
X
3
X
4
rho =0.01 134 134 5441 No convergence
rho =0.05 5 5 252 No convergence
Step 2. To run the perceptron algorithm for X
1
with learning parameter 0.01, type
rho=0.01; % Learning rate
w_ini=[1 1 -0.5]';
[w,iter,mis_clas]=perce(X1,y1,w_ini,rho)
By altering the previous code, the perceptron algorithm may be performed on the remaining data
sets using different learning parameter values. Table 2.1 contains the results obtained by performing
the previous experiments.
Step 3. Working as in step 2, compute the w’s using the perceptron algorithm ...