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

gnn_random_order : A random order sampler.
[gnn_dataset : Datasets for Training.]


Detailed Description

The gnn_random_order : A random order sampler. is a gnn_dataset : Datasets for Training. that acts as an intermediary between an opaque dataset and a sampling client, like a gnn_trainer : Trainers for Models..

On every call on gnn_dataset_reset, the gnn_random_order : A random order sampler. sampler generates a new permutation (a new sampling order) for the underlying gnn_dataset : Datasets for Training.. That is, the gnn_random_order : A random order sampler.'s ith-pattern , corresponds to the pattern of the underlying gnn_dataset : Datasets for Training. structure, where is the random permutation.

When building a gnn_random_order : A random order sampler. upon a given gnn_dataset : Datasets for Training., the gnn_random_order : A random order sampler. structure will own the source-dataset. That means that if you destroy the gnn_random_order : A random order sampler. structure, the underlying gnn_dataset : Datasets for Training. will be destroyed too.

Typedefs

typedef _gnn_random_order gnn_random_order
 The datatype for a random order sampler.


Functions

int gnn_random_order_reset (gnn_dataset *set)
 The "reset" function for a gnn_random_order.

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

void gnn_random_order_destroy (gnn_dataset *set)
 Destroy function.

gnn_datasetgnn_random_order_new (gnn_dataset *data)
 Builds a new random order sampler.

gnn_datasetgnn_random_order_from_inputs_new (gnn_input *inputs, gnn_input *outputs, gnn_input *weights)
 Builds a new random sampler from gnn_inputs.

gnn_datasetgnn_random_order_from_file_new (const char *inputsFile, const char *outputsFile, const char *weightsFile)
 Builds a new random order sampler from text files.

gnn_datasetgnn_random_order_get_dataset (gnn_dataset *set)
 Returns a pointer to the internal gnn_dataset.


Typedef Documentation

typedef struct _gnn_random_order gnn_random_order
 

This is the datatype for a dataset random order sampler. 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 52 of file gnn_random_order.h.


Function Documentation

void gnn_random_order_destroy gnn_dataset   set [static]
 

This is the gnn_random_order : A random order sampler. destroy function.

Parameters:
set  A pointer to a gnn_random_order : A random order sampler. dataset.

Definition at line 148 of file gnn_random_order.c.

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

This functions creates a new random order sampler 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_random_order : A random order sampler. dataset.

Definition at line 299 of file gnn_random_order.c.

gnn_dataset* gnn_random_order_from_inputs_new gnn_input   inputs,
gnn_input   outputs,
gnn_input   weights
 

This functions creates a new random order sampler 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.

Note:
Internally, a gnn_random_order : A random order sampler. sampler created this way contains a gnn_simple_set : A simple implementation of datasets. dataset.
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_random_order : A random order sampler. dataset.

Definition at line 263 of file gnn_random_order.c.

int gnn_random_order_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 random order sampler, where the k-th pattern is drawn in a random order from the internal gnn_dataset : Datasets for Training..

Parameters:
set  A pointer to a gnn_random_order : A random order sampler..
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 124 of file gnn_random_order.c.

gnn_dataset* gnn_random_order_get_dataset gnn_dataset   set
 

This function returns a pointer to the internal gnn_dataset : Datasets for Training. structure, which is used as source.

Parameters:
set  A pointer to a gnn_random_order : A random order sampler. dataset.
Returns:
Returns a pointer to the internal dataset.

Definition at line 320 of file gnn_random_order.c.

gnn_dataset* gnn_random_order_new gnn_dataset   data
 

This functions creates a new random order sampler from a given dataset. It will create a new random sampling permutation (i.e. it will shuffle) on each call on gnn_dataset_reset, so that a sequential pattern retrieval from pattern will return them in a random order.

Parameters:
data  The gnn_dataset : Datasets for Training. which should serve as pattern source.
Returns:
Returns a pointer to a new gnn_random_order : A random order sampler. dataset.

Definition at line 184 of file gnn_random_order.c.

int gnn_random_order_reset gnn_dataset   set [static]
 

This function resets the gnn_random_order : A random order sampler..

Parameters:
set  A pointer to a gnn_random_order : A random order sampler..
Returns:
0 if succeeded.

Definition at line 92 of file gnn_random_order.c.


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