Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

gnn_prototype : Prototypes.
[Atomic Nodes.]


Detailed Description

The gnn_prototype : Prototypes. datatype implements a set of prototypes in , which are compared against the input vectors. The function computed by this node is:

where is the -th prototype. In other words, the outputs measure the euclidian distance to each one of the prototypes.

The function's gradients are:

and

The prototypes are very effective in cojunction with a kernel function, like gnn_gaussian : Gaussian Kernel Activation Function., thus forming a Kernel Model.

Typedefs

typedef _gnn_prototype gnn_prototype
 The structure for a gnn_prototype : Prototypes. node.


Functions

int gnn_prototype_f (gnn_node *node, const gsl_vector *x, const gsl_vector *w, gsl_vector *y)
 Computes the output.

int gnn_prototype_dx (gnn_node *node, const gsl_vector *x, const gsl_vector *w, const gsl_vector *dy, gsl_vector *dx)
 Computes .

int gnn_prototype_dw (gnn_node *node, const gsl_vector *x, const gsl_vector *w, const gsl_vector *dy, gsl_vector *dw)
 Computes .

void gnn_prototype_destroy (gnn_node *node)
 The gnn_prototype : Prototypes. destroy function.

gnn_nodegnn_prototype_new (size_t input_size, size_t output_size, double min, double max)
 Creates a Prototype node.

gnn_nodegnn_prototype_standard_new (size_t input_size, size_t output_size)
 Creates a standard Prototype node.

int gnn_prototype_vector_freeze (gnn_node *node, size_t j)
 Freeze a prototype.

int gnn_prototype_vector_unfreeze (gnn_node *node, size_t j)
 Unfreeze a prototype.

int gnn_prototype_vector_set (gnn_node *node, size_t j, const gsl_vector *v)
 Sets a prototype.

int gnn_prototype_vector_get (gnn_node *node, size_t j, gsl_vector *v)
 Gets a prototype.


Typedef Documentation

typedef struct _gnn_prototype gnn_prototype
 

This datatype holds the information for a gnn_prototype : Prototypes. node. Basically, it extends the gnn_node with special pointers to get fast accesses to the prototype matrix.

Definition at line 49 of file gnn_prototype.h.


Function Documentation

void gnn_prototype_destroy gnn_node   node [static]
 

This functions is the gnn_prototype : Prototypes. destroy function.

Parameters:
node  A node to an gnn_prototype : Prototypes..

Definition at line 278 of file gnn_prototype.c.

int gnn_prototype_dw gnn_node   node,
const gsl_vector *    x,
const gsl_vector *    w,
const gsl_vector *    dy,
gsl_vector *    dw
[static]
 

This functions computes the gradient of the distance to the prototypes with respect to the prototypes' position. That is,

Parameters:
node  A pointer to a gnn_prototype : Prototypes. node.
x  The input vector .
w  The parameter vector .
dy  The vector .
dw  The output buffer vector .
Returns:
Returns 0 on success.

Definition at line 227 of file gnn_prototype.c.

int gnn_prototype_dx gnn_node   node,
const gsl_vector *    x,
const gsl_vector *    w,
const gsl_vector *    dy,
gsl_vector *    dx
[static]
 

This functions computes the gradient of the distance to the prototypes with respect to the inputs. That is,

Parameters:
node  A pointer to a gnn_prototype : Prototypes. node.
x  The input vector .
w  The parameter vector .
dy  The vector .
dx  The output buffer vector .
Returns:
Returns 0 on success.

Definition at line 166 of file gnn_prototype.c.

int gnn_prototype_f gnn_node   node,
const gsl_vector *    x,
const gsl_vector *    w,
gsl_vector *    y
[static]
 

This functions evaluates the distance to the prototypes.

Parameters:
node  A pointer to a gnn_prototype : Prototypes. node.
x  The input vector .
w  The parameter vector .
y  The output buffer vector .
Returns:
Returns 0 on success.

Definition at line 108 of file gnn_prototype.c.

gnn_node* gnn_prototype_new size_t    input_size,
size_t    output_size,
double    min,
double    max
 

This function creates a node of the gnn_prototype : Prototypes. type. Each one of its vectors is drawn from a uniform distribution between [min; max).

Parameters:
input_size  The input size .
output_size  The output size , and the number of prototypes.
min  The minimum value of a component.
max  The maximum value of a component.
Returns:
A pointer to a new gnn_prototype : Prototypes. node.

Definition at line 317 of file gnn_prototype.c.

gnn_node* gnn_prototype_standard_new size_t    input_size,
size_t    output_size
 

This function creates a node of the gnn_prototype : Prototypes. type. Each one of its vectors is drawn from a uniform distribution between [-1; 1).

Parameters:
input_size  The input size .
output_size  The output size , and the number of prototypes.
Returns:
A pointer to a new gnn_prototype : Prototypes. node.

Definition at line 437 of file gnn_prototype.c.

int gnn_prototype_vector_freeze gnn_node   node,
size_t    j
 

This function freezes the j-th prototype.

Parameters:
node  A pointer to a gnn_prototype : Prototypes. node.
j  The index of the prototype to be frozen.
Returns:
Returns 0 if succeeded.

Definition at line 453 of file gnn_prototype.c.

int gnn_prototype_vector_get gnn_node   node,
size_t    j,
gsl_vector *    v
 

This function gets the values of the j-th prototype and stores them into the given vector.

Parameters:
node  A pointer to a gnn_prototype : Prototypes. node.
j  The index of the prototype to be frozen.
v  A vector of the correct size, where the prototype's values should be copied in.
Returns:
Returns 0 if succeeded.

Definition at line 589 of file gnn_prototype.c.

int gnn_prototype_vector_set gnn_node   node,
size_t    j,
const gsl_vector *    v
 

This function sets a new value for the j-th prototype.

Parameters:
node  A pointer to a gnn_prototype : Prototypes. node.
j  The index of the prototype to be frozen.
v  A new with the new values for the prototype.
Returns:
Returns 0 if succeeded.

Definition at line 538 of file gnn_prototype.c.

int gnn_prototype_vector_unfreeze gnn_node   node,
size_t    j
 

This function unfreezes the j-th prototype.

Parameters:
node  A pointer to a gnn_prototype : Prototypes. node.
j  The index of the prototype to be unfrozen.
Returns:
Returns 0 if succeeded.

Definition at line 495 of file gnn_prototype.c.


Generated on Sun Jun 13 20:51:44 2004 for libgnn Gradient Retropropagation Machine Library by doxygen1.2.18