The Complete SPRLIB & ANNLIB

samann_learn_sample

- perform one learning cycles with the SAMANN learning algorithm

SYNOPSIS

int samann_learn_sample (net, sample1, sample2, eta, alpha, options)

ARGUMENTS

NET *net Pointer to a net; must be initialised by samann_init.
SAMPLE *sample1 A pointer to the first SAMPLE used in this cycle.
SAMPLE *sample2 A pointer to the second SAMPLE used in this cycle.
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 options See the note below.

RETURNS

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

FUNCTION

First, the distance between sample1 and sample2 in the original dataset is calculated. Then, the network is evaluated twice to find the network output vectors (i.e., the mapping) and calculate the distance between the samples in the map. After the first network evaluation, the samann_adapt_unit function is called to store each UNIT's activation. Then, when the map distance is calculated, samann_adapt_unit is called again to perform the actual weight updates.

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.
SAOLDPRP (Don't) backpropagate using the original weights (i.e., the weights as they were before this update of the network).

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_adapt_net

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