DataSource Class Reference

Abstract description of a source of a dataset. More...

#include <Dataset.h>

Inheritance diagram for DataSource:
Chessboard DataFile MultiClassTestProblem NoisyInterval SparseDistribution SphereDistribution1 TransformedProblem NoisyChessboard

List of all members.

Public Member Functions

 DataSource ()
 Constructor.
virtual ~DataSource ()
 Destructor.
int getDataDimension ()
 Returns the dimension of the input data.
int getTargetDimension ()
 Returns the dimension of the output data or target.
virtual bool GetData (Array< double > &data, Array< double > &target, int count)=0
 Data generation interface.

Protected Attributes

int dataDim
int targetDim

Detailed Description

Abstract description of a source of a dataset.

There are two main sources of data:
  • Static datasets loaded from files, often readily separated into test and training data
  • Artificial distributions allowing for the generation of arbitrary amounts of data using a random number generator or a dynamical system
To allow for a similar handling of these data types ReClaM offers the DataSource interface.

Definition at line 62 of file Dataset.h.


Constructor & Destructor Documentation

DataSource::DataSource (  ) 

Constructor.

Definition at line 100 of file Dataset.cpp.

DataSource::~DataSource (  )  [virtual]

Destructor.

Definition at line 104 of file Dataset.cpp.


Member Function Documentation

virtual bool DataSource::GetData ( Array< double > &  data,
Array< double > &  target,
int  count 
) [pure virtual]

Data generation interface.

This pure virtual function has to be overridden to provide labeled data, that is, pairs of input and target.
Usually, both data and target will be two dimensional. The first dimension is either the time or simply the number of the example. The second dimension corresponds to the input or target dimension.
Often the target is one dimensional. In this case the implementation may decide to provide a one dimensional array of target values.
Parameters:
data array to fill in with input data
target array to fill in with corresponding targets
count number of examples to produce

Implemented in Chessboard, NoisyChessboard, NoisyInterval, SphereDistribution1, SparseDistribution, TransformedProblem, MultiClassTestProblem, and DataFile.

Referenced by Dataset::Dataset(), and TransformedProblem::GetData().

int DataSource::getDataDimension (  )  [inline]

Returns the dimension of the input data.

Definition at line 73 of file Dataset.h.

References dataDim.

Referenced by Dataset::Dataset(), and TransformedProblem::TransformedProblem().

int DataSource::getTargetDimension (  )  [inline]

Returns the dimension of the output data or target.

Definition at line 79 of file Dataset.h.

References targetDim.

Referenced by Dataset::Dataset(), and TransformedProblem::TransformedProblem().


Member Data Documentation


The documentation for this class was generated from the following files: