One way to learn the weights is to start with random
weights then apply it to each example, changing the weights to
fit.
The perceptron training rule is used to change
the weights each time. It does
where
and
is target value, is perceptron output, and
is small constant (e.g., .1) called learning rate.