The Complete SPRLIB & ANNLIB

malloc_ptron

- allocate space for a perceptron and initialize

SYNOPSIS

PTRON *malloc_ptron (name, nin, nout, f, df, mode)

ARGUMENTS

char *name Name of the perceptron to be created, a vector of size [0..m].
int nin The number of inputs.
int nout The number of outputs.
double (*f) () A pointer to the transfer function.
double (*df) () A pointer to the derivative of the transfer function.
int mode The flags.

RETURNS

The function returns NULL if an error occurred. If no error occured the function returns a valid pointer to a perceptron instance.

FUNCTION

The function allocates space for a perceptron, i.e. allocates a structure PTRON, and initializes the necessary pointers. Each perceptron has a name indicated by name. The variables nin and nout determine the dimensionality of the input and output vectors. The variable mode determines the way the perceptron is treated during training, see the PTRON-flags. For the weights of the perceptron a random initialization between -2.0 and 0 in case of a single output and a uniform distribution is used for a multidimensional output.

NOTE

If no values are supplied for f and df, the simple functions will be used for f (simple_f) and df (simple_df).

SEE ALSO

simple_f, simple_df, normalize_ptron(2), free_ptron, learn_ptron, eval_ptron

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