The Complete SPRLIB & ANNLIB

sammon_solve

- minimize Sammon's stress measure

SYNOPSIS

int sammon_solve (method, learn_rate, momentum, max_steps, step, options)

ARGUMENTS

int method A flag, one of SAMMON_GD or SAMMON_PN (see SAMMON-flags).
double learn_rate The learning rate for the minimization method.
double momentum The momentum term for the minimization method.
long max_steps The maximum number of steps the minimization method should take.
long step The number of steps to take between printing some information (see options).
int options A flag-field.

RETURNS

TRUE in case an error occured, FALSE otherwise.

FUNCTION

This is the main function of the Sammon routines. First, it checks whether the routines have been initialized using sammon_init. Then, the flags are checked. The method should be either SAMMON_GD or SAMMON_PN, i.e. gradient descent or the pseudo-Newton method. The options flag variable can contain SAMMON_VERBOSE or SAMMON_GRAPHICS. If SAMMON_VERBOSE is set, the routine prints the stress after each step steps of the minimization method. After that, some vectors are created for storing a first and second derivative. Also, a matrix for storing the previous updates is created for momentum terms. Then, while the number of loops the method has taken is smaller than or equal to max_steps and the stress does not increase, Sammon's stress between the globals set and map is minimized using either gradient descent or pseudo-Newton. After each step, the map is backed up using sammon_backup_map, so that when the stress increases the optimal solution can be recalled using sammon_restore_map.

SEE ALSO

sammon_restore_map, sammon_backup_map, sammon_init, sammon_exit

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