Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Algorithm Class Reference

#include <algorithm.h>

Inheritance diagram for Algorithm:

Advancable linear_classification linear_regression List of all members.

Detailed Description

Base class of all learning algorithms that calculate the readout's output. Algorithms take the filtered and preprocessed input of a readout and calculate one single output. The current algorithm interface is designed for offline-training only, i.e. all learning must occur externally. The algorithm object only "learns" through imported parameter vectors.

Public Member Functions

Public Attributes

Protected Attributes


Constructor & Destructor Documentation

Algorithm::Algorithm unsigned int    in_rows = 1,
double    lower_bound = 0,
double    upper_bound = 1
 

Constructs a new learning algorithm.

Parameters:
in_rows Number of rows in each input vector.
lower_bound Lower bound of the algorithms range.
upper_bound Upper bound of the algorithms range.


Member Function Documentation

virtual int Algorithm::apply const double *    S,
double *    X
[pure virtual]
 

Applies the currently learned function to the filtered and preprocessed input vector.

Parameters:
S State of the liquid (= filtered and preprocessed response of the neural microcircuit).
X Target pointer where to save the result.
Returns:
-1 if an error occured, 1 for success.

Implemented in linear_classification, and linear_regression.

virtual double* Algorithm::exportRepresentation int *    rep_length [pure virtual]
 

Exports the representation of this algorithm for use in external objects.

Parameters:
rep_length Length of the representation vector.
Returns:
A list of parameters that represent the algorithm.
Warning:
Do not forget to free the memory reserved for the representation!

Implemented in linear_classification, and linear_regression.

virtual string Algorithm::getFormatDescription   [pure virtual]
 

Returns a textual description of the representation format for import/export - Representation.

Implemented in linear_classification, and linear_regression.

int Algorithm::getInputRows   [inline]
 

Returns the number of input rows.

double Algorithm::getParameter string    name [virtual]
 

Returns the current value of a parameter.

Parameters:
name Name of the parameter.
Returns:
The value of the parameter.

void Algorithm::getRange double *    a,
double *    b
 

Returns the range of the algorithm's target values [a, b].

Parameters:
a Address of lower bound for algorithm's target values.
b Address of upper bound for algorithm's target values.

virtual int Algorithm::importRepresentation const double *    rep,
int    rep_length
[pure virtual]
 

Imports the data from an externally (e.g. Matlab) trained algorithm.

Parameters:
rep Representation of the algorithm as a double vector.
rep_length Length of the representation vector.
Returns:
-1 if an error occured, 1 for success.

Implemented in linear_classification, and linear_regression.

virtual void Algorithm::reset void    [inline, virtual]
 

Resets the information stored within the algorithm.

Implements Advancable.

Reimplemented in linear_classification, and linear_regression.

void Algorithm::setParameter string    name,
double    value
[virtual]
 

Sets a parameter of the algorithm.

Parameters:
name Name of the parameter.
value Value to set for the parameter.

void Algorithm::setRange double    a,
double    b
 

Sets the range of the algorithm's target values [a, b].

Parameters:
a Lower bound for algorithm's target values.
b Upper bound for algorithm's target values.

int Algorithm::updateInternal   [virtual]
 

This function is called after parameters are updated.

list< string > Algorithm::validParameters void    [virtual]
 

Returns the names of the valid parameters.

Returns:
A string list indicating the valid parameter names.