The Complete SPRLIB & ANNLIB

samann_learn

- perform a number of learning cycles with the backpropagation learning algorithm

SYNOPSIS

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

ARGUMENTS

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

RETURNS

TRUE if an error was detected, FALSE if no error was detected.

FUNCTION

After some initial checking, the function samann_learn_sample is called cycles times. There are two possible definitions of a cycle. If the SARNDPICK flag is set in options, one cycle means picking two samples randomly from the dataset and passing them to the samann_learn_sample function. Otherwise, one cycle means taking all possible combinations of samples in set and passing them to samann_learn_sample. Note that this can computationally become very intensive, since there are 1/2 * n * (n-1) combinations of n samples. In the latter case, if the flag SAVERBOSE is set in options, a counter is printed to stdout indicating which pair of samples is currently considered. For a full description of the update rule, please see: Mao, J. and Jain, A.K., Artificial neural networks for feature extraction and multivariate data projection, IEEE Transactions on Neural Networks, 6(2):296-317, 1995.

NOTE

In the options parameter the following flags are to be specified:
HISTU (Don't) store history of unit values at each update.
HISTT (Don't) store history of unit thetas at each update.
HISTW (Don't) store history of weights at each update.
SAACCUM (Don't) accumulate the delta's.
SAUPDATE (Don't) update the weights.
SARNDPICK (Don't) update one sample-pair at a time.
SAVERBOSE (Don't) print a counter when updating the units.

Note that the HIST-flags and SAMANN-flags may be ORed. Furthermore, note the following for (SAACCUM, SAUPDATE) - triples:
0 0 0: Combination does not make sense (nothing is done).
0 0 1: Yields no backpropagation, only updates.
0 1 0: Yields only backpropagation, no updates.
0 1 1: Specifies normal mode, i.e. backpropagation and update.

SEE ALSO

samann_adapt_unit, samann_learn_sample

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