, 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_node * | gnn_prototype_new (size_t input_size, size_t output_size, double min, double max) |
| Creates a Prototype node. | |
| gnn_node * | gnn_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. | |
|
|
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. |
|
|
This functions is the gnn_prototype : Prototypes. destroy function.
Definition at line 278 of file gnn_prototype.c. |
|
||||||||||||||||||||||||
|
This functions computes the gradient of the distance to the prototypes with respect to the prototypes' position. That is,
Definition at line 227 of file gnn_prototype.c. |
|
||||||||||||||||||||||||
|
This functions computes the gradient of the distance to the prototypes with respect to the inputs. That is,
Definition at line 166 of file gnn_prototype.c. |
|
||||||||||||||||||||
|
This functions evaluates the distance to the prototypes.
Definition at line 108 of file gnn_prototype.c. |
|
||||||||||||||||||||
|
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).
Definition at line 317 of file gnn_prototype.c. |
|
||||||||||||
|
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).
Definition at line 437 of file gnn_prototype.c. |
|
||||||||||||
|
This function freezes the j-th prototype.
Definition at line 453 of file gnn_prototype.c. |
|
||||||||||||||||
|
This function gets the values of the j-th prototype and stores them into the given vector.
Definition at line 589 of file gnn_prototype.c. |
|
||||||||||||||||
|
This function sets a new value for the j-th prototype.
Definition at line 538 of file gnn_prototype.c. |
|
||||||||||||
|
This function unfreezes the j-th prototype.
Definition at line 495 of file gnn_prototype.c. |
1.2.18