- update the perceptron weight using the
Widrow-Hoff delta rule (LOCAL)
SYNOPSIS
int widrow_hoff_ptron
(ptron, c)
ARGUMENTS
PTRON
*ptron
The perceptron to be updated.
double
c
The learning parameter.
RETURNS
The function returns TRUE if an error was detected. If no error was
detected the function returns FALSE and the weights are updated.
FUNCTION
This function performs the Widrow-Hoff updating rule on the perceptron
weights of ptron and using a learning rate of c. The update is performed
using the weight changes stored in the percepetron structure, after
updating the delta weights are cleared. The update rule is quite
simple, the weight changes are added to the weights multiplied by
c,c is first normalized by the number of patterns that were used
to compute the weight changes. If the update mode was set to NORM_UPD,
the new weights are also normalized, see normalize_ptron(1) The
standard Widrow-Hoff rule is given by : Wnew = Wold + eta*Wdelta, where
Wdelta is given by : O(x)*f(x), ie. inproduct of the desired output
and the real ouput for a pattern x, and eta is the learning rate.
NOTE
The structure variables nlearn and dw are reset to 0.