Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ArrayTrainSet Class Reference

Data series training set, especially useful for time series. More...

#include <patternset.h>

Inheritance diagram for ArrayTrainSet:

PatternSource List of all members.

Public Methods

 ArrayTrainSet (int inputs, int outputs, char *filename)
virtual void make (int patterns, int inputs, int outputs)
virtual void print (FILE *out=stdout) const
virtual double input (int p, int i) const
virtual double output (int p, int j) const
void multiply (double k)
void truncate (int size)

Public Attributes

Array< double > data

Detailed Description

Data series training set, especially useful for time series.

This class was made to make it possible to use plain data sets as training sets without the need to first convert their source files to classical training set files. The class simply reads the set from file to an array, and then calculates the values for input and output requests relatively. It also calculates the number of training patterns from the size of the set and sizes of inputs and outputs.

Definition at line 300 of file patternset.h.


Constructor & Destructor Documentation

ArrayTrainSet int    inputs,
int    outputs,
char *    filename
 

Standard constructor.

Parameters:
inputs  Number of input variables.
outputs  Number of output variables.
filename  Filename of the file that contains the series.

Definition at line 435 of file patternset.cc.

References data, PatternSource::inputs, PatternSource::outputs, and PatternSource::patterns.


Member Function Documentation

virtual double input int    p,
int    i
const [inline, virtual]
 

Returns the value of input variable i in pattern p.

Reimplemented from PatternSource.

Definition at line 318 of file patternset.h.

References data.

virtual void make int    patterns,
int    inputs,
int    outputs
[inline, virtual]
 

FORBIDDEN.

Reimplemented from PatternSource.

Definition at line 313 of file patternset.h.

References PatternSource::inputs, PatternSource::outputs, and PatternSource::patterns.

void multiply double    k
 

Scales all input and output values with the multiplier k.

Definition at line 465 of file patternset.cc.

References data.

virtual double output int    p,
int    j
const [inline, virtual]
 

Returns the value of output variable j in pattern p.

Reimplemented from PatternSource.

Definition at line 319 of file patternset.h.

References data, and PatternSource::inputs.

void print FILE *    out = stdout const [virtual]
 

Prints the contents of the set to the given stream.

Reimplemented from PatternSource.

Definition at line 452 of file patternset.cc.

References data.

void truncate int    size
 

Resizes the dataset to the given size.

Definition at line 470 of file patternset.cc.

References data, PatternSource::inputs, PatternSource::outputs, and PatternSource::patterns.


Member Data Documentation

Array<double> data
 

Here all the patterns are represented in the same array.

First pattern is at data[0..ins-1], second at data[1..ins-0], third at data[2..ins+1], etc.

Definition at line 336 of file patternset.h.

Referenced by ArrayTrainSet(), input(), multiply(), output(), print(), and truncate().


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 20:06:45 2005 for Inanna by doxygen1.2.18