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

gnn_simple_set : A simple implementation of datasets.
[gnn_dataset : Datasets for Training.]


Detailed Description

The gnn_simple_set : A simple implementation of datasets. dataset is a simple implementation of a dataset structure. It is built given three input samplers (gnn_input : Reading and handling of sets of vectors. structures): one for inputs, targets and weights.

There are two ways for building a simple set:

The simple set, in order to get the ith-pattern , retrieves the ith-sample from the input, target and weight source (if any) calling the gnn_input_get function on each of them.

Typedefs

typedef _gnn_simple_set gnn_simple_set
 The datatype for simple sets.


Functions

int gnn_simple_set_reset (gnn_dataset *set)
 The "reset" function for a simple set.

int gnn_simple_set_get (gnn_dataset *set, size_t k, gsl_vector **x, gsl_vector **t, double *p)
 The "get" function for a simple set.

void gnn_simple_set_destroy (gnn_dataset *set)
 Destroy function.

gnn_datasetgnn_simple_set_new (gnn_input *inputs, gnn_input *outputs, gnn_input *weights)
 Builds a new simple set.

gnn_datasetgnn_simple_set_from_files_new (const char *inputsFile, const char *outputsFile, const char *weightsFile)
 Builds a new simple set from text files.

gnn_inputgnn_simple_set_get_inputs (gnn_dataset *set)
 Returns a pointer to the inputs.

gnn_inputgnn_simple_set_get_outputs (gnn_dataset *set)
 Returns a pointer to the target vector input device.

gnn_inputgnn_simple_set_get_weights (gnn_dataset *set)
 Returns a pointer to the inputs.


Typedef Documentation

typedef struct _gnn_simple_set gnn_simple_set
 

This is the datatype for simple sets. It extends the basic gnn_dataset : Datasets for Training. structure to include three additional pointers to the input pattern, output pattern and pattern weights samplers.

Definition at line 50 of file gnn_simple_set.h.


Function Documentation

void gnn_simple_set_destroy gnn_dataset   set [static]
 

This is the gnn_simple_set : A simple implementation of datasets. destroy function.

Parameters:
set  A pointer to a gnn_simple_set : A simple implementation of datasets. dataset.

Definition at line 174 of file gnn_simple_set.c.

gnn_dataset* gnn_simple_set_from_files_new const char *    inputsFile,
const char *    outputsFile,
const char *    weightsFile
 

This functions creates a new simple set from two or three text files containing the patterns.

The text files should be ASCII-formatted, and should contain matrices where the number of columns corresponds to the size of the vectors, and the row number to the number of patterns. Obviously, it is illegal to provide matrices of different row sizes. Also, the weights file should have only one column.

If the weights file is omitted (i.e. it is a pointer to NULL), the the weights are assumed to be 1.

It is basically a shorthand for building the dataset from gnn_input : Reading and handling of sets of vectors. structures which themselves should be built from text files.

Parameters:
inputs  The name of the file containing the input examples.
outputs  The name of the file containing the output examples (targets).
weights  The name of the file containing the vector with the weights for each pattern, or NULL if they should all be 1.
Returns:
Returns a pointer to a new gnn_simple_set : A simple implementation of datasets. dataset.

Definition at line 304 of file gnn_simple_set.c.

int gnn_simple_set_get gnn_dataset   set,
size_t    k,
gsl_vector **    x,
gsl_vector **    t,
double *    p
[static]
 

This function is returns the k-th pattern in the simple set, where the k-th input pattern, output pattern and pattern weight are sampled from the internally installed device samplers.

Parameters:
set  A pointer to a gnn_simple_set : A simple implementation of datasets..
k  The index of the pattern to be retrieved.
x  A reference for the input pattern.
t  A reference for the output pattern.
p  A pointer to a double for the pattern weight.
Returns:
0 if succeeded.

Definition at line 128 of file gnn_simple_set.c.

gnn_input* gnn_simple_set_get_inputs gnn_dataset   set
 

This function returns a pointer to the inputs, which are of the gnn_input : Reading and handling of sets of vectors. type.

Parameters:
set  A pointer to a gnn_simple_set : A simple implementation of datasets. dataset.
Returns:
Returns a pointer to the internal input device.

Definition at line 341 of file gnn_simple_set.c.

gnn_input* gnn_simple_set_get_outputs gnn_dataset   set
 

This function returns a pointer to the outputs, which are of the gnn_input : Reading and handling of sets of vectors. type.

Parameters:
set  A pointer to a gnn_simple_set : A simple implementation of datasets. dataset.
Returns:
Returns a pointer to the internal target vector input device.

Definition at line 361 of file gnn_simple_set.c.

gnn_input* gnn_simple_set_get_weights gnn_dataset   set
 

This function returns a pointer to the weights input device, which are of the gnn_input : Reading and handling of sets of vectors. type or NULL if not available.

Parameters:
set  A pointer to a gnn_simple_set : A simple implementation of datasets. dataset.
Returns:
Returns a pointer to the internal weight input device or NULL.

Definition at line 382 of file gnn_simple_set.c.

gnn_dataset* gnn_simple_set_new gnn_input   inputs,
gnn_input   outputs,
gnn_input   weights
 

This functions creates a new simple set from two or three input samplers. The first two correspond to the input pattern and output pattern samplers, wich should contain the same amount of patterns. The third is the pattern weight sampler, which, if given, should also be of the same size. If omitted (that means it is a NULL pointer), then all weights are assumed to be 1.

Parameters:
inputs  The input sampler, a gnn_input : Reading and handling of sets of vectors. object.
outputs  The target sampler, a gnn_input : Reading and handling of sets of vectors. object.
weights  The weight sampler, a gnn_input : Reading and handling of sets of vectors. object.
Returns:
Returns a pointer to a new gnn_simple_set : A simple implementation of datasets. dataset.

Definition at line 215 of file gnn_simple_set.c.

int gnn_simple_set_reset gnn_dataset   set [static]
 

This function resets the gnn_simple_set : A simple implementation of datasets..

Parameters:
set  A pointer to a gnn_simple_set : A simple implementation of datasets..
Returns:
0 if succeeded.

Definition at line 95 of file gnn_simple_set.c.


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