The error landscape for the OR network shows how the total error (or TSS) changes as the values of the weights in the network change. To graph the error equation for a network, you need several things:
TSS = Σ (targetp - outputp)2
| i1 | i2 | o1 | |
| p0 | 0 | 0 | 0 |
| p1 | 0 | 1 | 1 |
| p2 | 1 | 0 | 1 |
| p3 | 1 | 1 | 1 |
TSS = (targetp0 - outputp0)2 + (targetp1 - outputp1)2 + (targetp2 - outputp2)2 + (targetp3 - outputp3)2
= (0 - outputp0)2 + (1 - outputp1)2 + (1 - outputp2)2 + (1 - outputp3)2
= outputp02 + (1 - outputp1)2 + (1 - outputp2)2 + (1 - outputp3)2
o1 = f(i1*w1 + i2*w2 + b1)
where f(x) is the sigmoid equation given by:f(x) = 1/(1+e-x)
o1 = f(0*w1 + 0*w2 + b1) = f(b1)
For pattern p1:o1 = f(0*w1 + 1*w2 + b1) = f(w2+b1)
For pattern p2:o1 = f(1*w1 + 0*w2 + b1) = f(w1+b1)
For pattern p3:o1 = f(1*w1 + 1*w2 + b1) = f(w1+w2+b1)
TSS == outputp02 + (1 - outputp1)2 + (1 - outputp2)2 + (1 - outputp3)2
= (1/(1+e-b1))2 + (1 - (1/(1+e-(w2+b1))))2 + (1 - (1/(1+e-(w1+b1))))2 + (1 - (1/(1+e-(w1+w2+b1))))2
(1/(1+e-b1))2 + 2 * (1-(1/(1+e-(1+b1))))2 + (1-(1/(1+e-(2+b1))))2
Transforming this equation into the required form for the GA tutorial, yields:(1/(1+e^(-x)))^2 + 2 * (1-(1/(1+e^(-(1+x)))))^2 + (1-(1/(1+e^(-(2+x)))))^2
Or for use in gnuplot:(1/(1+exp(-x)))**2 + 2 * (1-(1/(1+exp(-(1+x)))))**2 + (1-(1/(1+exp(-(2+x)))))**2
(1/(1+e-b1))2 + 2 * (1-(1/(1+e-(w1+b1))))2 + (1-(1/(1+e-(2*w1+b1))))2
Transforming this equation into the required form for the GA tutorial, yields:(1/(1+e^(-x)))^2 + 2 * (1-(1/(1+e^(-(y+x)))))^2 + (1-(1/(1+e^(-(2*y+x)))))^2
Or for use in gnuplot:(1/(1+exp(-x)))**2 + 2 * (1-(1/(1+exp(-(y+x)))))**2 + (1-(1/(1+exp(-(2*y+x)))))**2