#include <patternset.h>
Inheritance diagram for ArrayTrainSet:
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 |
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.
|
Standard constructor.
Definition at line 435 of file patternset.cc. References data, PatternSource::inputs, PatternSource::outputs, and PatternSource::patterns. |
|
Returns the value of input variable i in pattern p.
Reimplemented from PatternSource. Definition at line 318 of file patternset.h. References data. |
|
FORBIDDEN.
Reimplemented from PatternSource. Definition at line 313 of file patternset.h. References PatternSource::inputs, PatternSource::outputs, and PatternSource::patterns. |
|
Scales all input and output values with the multiplier k.
Definition at line 465 of file patternset.cc. References data. |
|
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. |
|
Prints the contents of the set to the given stream.
Reimplemented from PatternSource. Definition at line 452 of file patternset.cc. References data. |
|
Resizes the dataset to the given size.
Definition at line 470 of file patternset.cc. References data, PatternSource::inputs, PatternSource::outputs, and PatternSource::patterns. |
|
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(). |