OpenANN  1.1.0
An open source library for artificial neural networks.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Public Attributes
BCIDataSet Class Reference

#include <BCIDataSet.h>

+ Inheritance diagram for BCIDataSet:

Classes

class  BCIDataCache
 

Public Types

enum  DataType { TRAINING, TEST, DEMO }
 

Public Member Functions

 BCIDataSet (const std::string &directory, const std::string &subject, const std::string &dataType, bool loadNow=true)
 
virtual ~BCIDataSet ()
 
void load ()
 
void determineDimension ()
 
void loadFlashing ()
 
void loadStimulusCode ()
 
void loadStimulusType ()
 
void loadTargetChar ()
 
void loadSignal ()
 
void setupInterface ()
 
void clear ()
 
std::string fileName (const std::string &type)
 
void decimate (int factor=1)
 
void compress (OpenANN::Compressor &compressor)
 
void reset ()
 
virtual int samples ()
 Number of instances. More...
 
virtual int inputs ()
 Input dimensions of instances. More...
 
virtual int outputs ()
 Output dimensions of instances. More...
 
virtual Eigen::VectorXd & getInstance (int i)
 Get the input of the ith instance. More...
 
void getOffsets (int i, int &epoch, int &t0)
 
void buildInstance (int epoch, int t0)
 
Eigen::MatrixXd extractInstance (int epoch, int t0)
 
Eigen::VectorXd toVector (const Eigen::MatrixXd &matrix)
 
virtual Eigen::VectorXd & getTarget (int i)
 Get the output of the ith instance. More...
 
char getTargetChar (int i)
 
virtual void finishIteration (OpenANN::Learner &mlp)
 This function is called after an iteration of the optimization algorithm. More...
 
int evaluate (OpenANN::Learner &mlp, int trials)
 
- Public Member Functions inherited from OpenANN::DataSet
virtual ~DataSet ()
 

Public Attributes

std::string directory
 
std::string subject
 
enum BCIDataSet::DataType dataType
 
Eigen::MatrixXd flashing
 
Eigen::MatrixXd stimulusCode
 
Eigen::MatrixXd stimulusType
 
std::vector< char > targetChar
 
std::vector< Eigen::MatrixXd > signal
 
int sampling
 
int channels
 
int epochs
 
int readEpochs
 
int maxT
 
int N
 
int D
 
int F
 
std::vector< std::vector< int > > instanceStart
 
std::vector< std::vector
< Eigen::VectorXd > > 
instanceLabel
 
OpenANN::Logger debugLogger
 
Eigen::VectorXd tempInstance
 
int iteration
 
bool comp
 
OpenANN::Compressorcompressor
 
bool decimated
 
int downSamplingFactor
 
BCIDataCache cache
 

Member Enumeration Documentation

Enumerator
TRAINING 
TEST 
DEMO 

Constructor & Destructor Documentation

BCIDataSet::BCIDataSet ( const std::string &  directory,
const std::string &  subject,
const std::string &  dataType,
bool  loadNow = true 
)
virtual BCIDataSet::~BCIDataSet ( )
inlinevirtual

Member Function Documentation

void BCIDataSet::buildInstance ( int  epoch,
int  t0 
)
void BCIDataSet::clear ( )
void BCIDataSet::compress ( OpenANN::Compressor compressor)
void BCIDataSet::decimate ( int  factor = 1)
void BCIDataSet::determineDimension ( )
int BCIDataSet::evaluate ( OpenANN::Learner mlp,
int  trials 
)
Eigen::MatrixXd BCIDataSet::extractInstance ( int  epoch,
int  t0 
)
std::string BCIDataSet::fileName ( const std::string &  type)
void BCIDataSet::finishIteration ( OpenANN::Learner learner)
virtual

This function is called after an iteration of the optimization algorithm.

It could log results, modify or extend the data set or whatever.

Parameters
learnerlearned model

Implements OpenANN::DataSet.

Eigen::VectorXd & BCIDataSet::getInstance ( int  n)
virtual

Get the input of the ith instance.

Parameters
nnumber of instance
Returns
input

Implements OpenANN::DataSet.

void BCIDataSet::getOffsets ( int  i,
int &  epoch,
int &  t0 
)
Eigen::VectorXd & BCIDataSet::getTarget ( int  n)
virtual

Get the output of the ith instance.

Parameters
nnumber of instance
Returns
output

Implements OpenANN::DataSet.

char BCIDataSet::getTargetChar ( int  i)
virtual int BCIDataSet::inputs ( )
inlinevirtual

Input dimensions of instances.

Returns
number of inputs

Implements OpenANN::DataSet.

void BCIDataSet::load ( )
void BCIDataSet::loadFlashing ( )
void BCIDataSet::loadSignal ( )
void BCIDataSet::loadStimulusCode ( )
void BCIDataSet::loadStimulusType ( )
void BCIDataSet::loadTargetChar ( )
virtual int BCIDataSet::outputs ( )
inlinevirtual

Output dimensions of instances.

Returns
number of outputs

Implements OpenANN::DataSet.

void BCIDataSet::reset ( )
virtual int BCIDataSet::samples ( )
inlinevirtual

Number of instances.

Assumes that the data set has a fixed size, at least for one iteration of the optimization algorithm.

Returns
number of examples

Implements OpenANN::DataSet.

void BCIDataSet::setupInterface ( )
Eigen::VectorXd BCIDataSet::toVector ( const Eigen::MatrixXd &  matrix)

Member Data Documentation

BCIDataCache BCIDataSet::cache
int BCIDataSet::channels
bool BCIDataSet::comp
OpenANN::Compressor* BCIDataSet::compressor
int BCIDataSet::D
enum BCIDataSet::DataType BCIDataSet::dataType
OpenANN::Logger BCIDataSet::debugLogger
bool BCIDataSet::decimated
std::string BCIDataSet::directory
int BCIDataSet::downSamplingFactor
int BCIDataSet::epochs
int BCIDataSet::F
Eigen::MatrixXd BCIDataSet::flashing
std::vector<std::vector<Eigen::VectorXd> > BCIDataSet::instanceLabel
std::vector<std::vector<int> > BCIDataSet::instanceStart
int BCIDataSet::iteration
int BCIDataSet::maxT
int BCIDataSet::N
int BCIDataSet::readEpochs
int BCIDataSet::sampling
std::vector<Eigen::MatrixXd> BCIDataSet::signal
Eigen::MatrixXd BCIDataSet::stimulusCode
Eigen::MatrixXd BCIDataSet::stimulusType
std::string BCIDataSet::subject
std::vector<char> BCIDataSet::targetChar
Eigen::VectorXd BCIDataSet::tempInstance

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