Machine Learning Notes
Machine Learning Notes
It is widely used in back propagation network because of the relationship between the value of the
function at a point and the value of the derivative at that point which reduces the computational
burden during training.
f(x) = 1/1+e^-λx
f(x) = 2/1+e^λx - 1
1-e^-λx/1+e^λx
f'(x) = λ/2[1+f(x)][1-f(x)]
Range of sigmoid function varies from -1 to 1
We can obtain the output of the neuron, for binary sigmoidal function and bi-polar sigmoidal
activation function
A perceptron is used to build the artificial neural network system. It takes a vector of real-valued
inputs and calculates linear combination of these inputs then output is 1 if the result is greater than
some threshold value else -1 otherwise.
-1 if otherwise
1. One way to learn an acceptable weight vector is to begin with random weights, then
iteratively apply the perceptron to each training example, modify the perceptron weights
whenever it misclassifies an example.
2. This process is repeated iterating through the training examples as many times as needed
until the perceptron classifies all training examples correctly.
3. Weights are modified at each step according to the perceptron training rule, which revises
the weights ‘wi’ associated with input ‘xi’ according to the rule
Wi <- wi + ∆ wi
Where ∆ wi = n( t – o ) xi
t = target O/P
o = Actual O/P
xi = Input
Algorithm:
perceptron_training_rule(X,n)
repeat
∑ (w,x)
if (tx ≠ ox)
for each wi
wi <- wi + ∆wi
∆ wi < n(tx-ox) xi
end for
end if
end for
Note: Until all training instances in X are correctly classified then you have to return w
Truth Table:
x1 x2 x1 ^ x2
0 0 0
0 1 0
1 0 0
1 1 1
w1 = 1.2, w2 = 0.6, VT = 1
wi = w1 + n(tx-ox)xi
w1 = 0.7, w2 = 0.6
i) x1 = 0 & x2 = 0, tx = 0
wixi = w1x1 + w2x2 = 0.7 x 0 + 0.6 x 0 = 0
tx = ox
ii) x 1 = 0 & x2 = 1
tx = ox
iii) x1 = 1, x2 = 1, tx = 1
tx = ox
iv) x1 = 1, x2 = 1, tx = 1
wixi = w1x1 + w2x2 = 0.7 x 1 + 0.6 x 1 = 1.3 ≥ 1
tx = 1 => tx = ∆x