The Complete SPRLIB & ANNLIB

bp_learn_pocket

- train a network using the pocket algorithm

SYNOPSIS

int bp_learn_pocket (net, data_set, eta, alpha, cycles, options)

ARGUMENTS

NET *net Pointer to a net; must be initialized by bp_init().
DATASET *data_set A pointer to a learning set (must be an IOSET).
double eta The coefficient eta (the learning rate) of the backpropagation rule.
double alpha The coefficient alpha (the momentum term) of the backpropagation rule.
long cycles Number of learning cycles to be performed.
long options See the note below.

RETURNS

The function returns TRUE if an error was detected, FALSE otherwise.

FUNCTION

This function trains a network pointed to by net using the pocket algorithm. The pocket algorithm is an extension of the standard backpropagation algorithm. The training process is equal to the backpropagation method, but when the process starts, the best network weights found so far are stored in a ``pocket''. When having trained for a number of cycles, the performance of the new weights is checked against those in the pocket. If the pocket weights are better, they are restored and training is resumed. However, if the new network weights are better than the pocket weights, the pocket is cleared and the weights are put into the pocket. Also, in this case network training is resumed until the number of cycles is reached.

NOTE

The options contains several flags which can be set to control network learning. These are the same as in bp_learn.

SEE ALSO

bp_learn, restore_pocket_weights, pocket_weights

This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998