CEBL  2.1
Public Member Functions | Friends
EEGTrainingData Class Reference

#include <EEGTrainingData.hpp>

Public Member Functions

 EEGTrainingData ()
 ~EEGTrainingData ()
void set (unsigned int cls, unsigned int seq, EEGData &data)
 sets data at class and sequence
void append (unsigned int cls, unsigned int seq, EEGData &data)
 adds data to the end of already set data at class and sequence
EEGDataget (unsigned int cls, unsigned int seq)
 returns the data at class and sequence
const EEGDatagetConst (unsigned int cls, unsigned int seq) const
 get a constant reference to data located at class and sequence
void reserve (unsigned int cls, unsigned int seq)
 reserve space for certain number of classes and sequence
void clear ()
 clear's all data
ublas::matrix< double > collapse () const
 collapse sequences and classes into a single matrix of data.
ublas::vector< int > getClassVector () const
 returns a vector representing the order of classes
std::vector< int > getSequenceOrder () const
 returns a vector representing the order of sequences recorded
ublas::vector< int > getTargets () const
 returns a vector of classes for each sample in the collapsed matrix
int numClasses () const
 returns the number of classes.
int numSequences () const
 returns the number of sequences in first class.
int numSequences (unsigned int cls) const
 returns the number of sequences in class.
int samplesInClass (unsigned int cls) const
 returns the number of samples in a specific class.
int numSamples (unsigned int cls) const
 returns the number of samples total in a class
int numSamples (unsigned int cls, unsigned int sequence) const
 returns the number of samples int specific sequence
int numSamples () const
 returns the number of samples total.
int numFeatures () const
 returns the number of features total.
std::vector< string > getClassLabels () const
 get class labels
std::vector< string > getChannelNames () const
 get channel names
bool getFiltered () const
 get filtered flag
void setClassLabels (std::vector< string >)
 set class labels
void setChannelNames (std::vector< string >)
 set channel names
void setFiltered (bool filtered)
 set filtered flag
void setSequenceOrder (std::vector< int > ord)
 set sequence order vector

Friends

class boost::serialization::access

Detailed Description

Definition at line 41 of file EEGTrainingData.hpp.


Constructor & Destructor Documentation

EEGTrainingData::EEGTrainingData ( )

Definition at line 10 of file EEGTrainingData.cpp.

EEGTrainingData::~EEGTrainingData ( )

Definition at line 17 of file EEGTrainingData.cpp.


Member Function Documentation

void EEGTrainingData::append ( unsigned int  cls,
unsigned int  seq,
EEGData data 
)

adds data to the end of already set data at class and sequence

Definition at line 47 of file EEGTrainingData.cpp.

void EEGTrainingData::clear ( )
inline

clear's all data

Definition at line 90 of file EEGTrainingData.hpp.

ublas::matrix< double > EEGTrainingData::collapse ( ) const

collapse sequences and classes into a single matrix of data.

Definition at line 77 of file EEGTrainingData.cpp.

References EEGData::append().

Referenced by main(), CEBL::QDA::train(), and CEBL::LDA::train().

EEGData & EEGTrainingData::get ( unsigned int  cls,
unsigned int  seq 
)

returns the data at class and sequence

Definition at line 65 of file EEGTrainingData.cpp.

Referenced by FeaturesConfig::extract(), main(), DataProcess::process(), and RealTimeClassification::trainClassifier().

std::vector< string > EEGTrainingData::getChannelNames ( ) const

get channel names

Definition at line 218 of file EEGTrainingData.cpp.

Referenced by DataIO::saveTrainingSessionToFile().

std::vector< string > EEGTrainingData::getClassLabels ( ) const

get class labels

Definition at line 212 of file EEGTrainingData.cpp.

Referenced by DataIO::saveTrainingSessionToFile().

ublas::vector< int > EEGTrainingData::getClassVector ( ) const

returns a vector representing the order of classes

Definition at line 91 of file EEGTrainingData.cpp.

References cppR::count().

const EEGData & EEGTrainingData::getConst ( unsigned int  cls,
unsigned int  seq 
) const

get a constant reference to data located at class and sequence

Definition at line 71 of file EEGTrainingData.cpp.

Referenced by DataIO::saveTrainingSessionToFile().

bool EEGTrainingData::getFiltered ( ) const

get filtered flag

Definition at line 224 of file EEGTrainingData.cpp.

std::vector< int > EEGTrainingData::getSequenceOrder ( ) const

returns a vector representing the order of sequences recorded

Definition at line 106 of file EEGTrainingData.cpp.

Referenced by DataIO::saveTrainingSessionToFile().

ublas::vector< int > EEGTrainingData::getTargets ( ) const

returns a vector of classes for each sample in the collapsed matrix

Definition at line 111 of file EEGTrainingData.cpp.

Referenced by main(), CEBL::QDA::train(), and CEBL::LDA::train().

int EEGTrainingData::numClasses ( ) const
int EEGTrainingData::numFeatures ( ) const

returns the number of features total.

Definition at line 200 of file EEGTrainingData.cpp.

int EEGTrainingData::numSamples ( unsigned int  cls) const
inline

returns the number of samples total in a class

Definition at line 117 of file EEGTrainingData.hpp.

References samplesInClass().

Referenced by operator<<(), and TabTraining::updateView().

int EEGTrainingData::numSamples ( unsigned int  cls,
unsigned int  sequence 
) const

returns the number of samples int specific sequence

Definition at line 185 of file EEGTrainingData.cpp.

int EEGTrainingData::numSamples ( ) const

returns the number of samples total.

Definition at line 190 of file EEGTrainingData.cpp.

int EEGTrainingData::numSequences ( ) const
int EEGTrainingData::numSequences ( unsigned int  cls) const

returns the number of sequences in class.

Definition at line 167 of file EEGTrainingData.cpp.

void EEGTrainingData::reserve ( unsigned int  cls,
unsigned int  seq 
)

reserve space for certain number of classes and sequence

Definition at line 22 of file EEGTrainingData.cpp.

Referenced by FeaturesConfig::extract(), DataProcess::process(), and RealTimeClassification::trainClassifier().

int EEGTrainingData::samplesInClass ( unsigned int  cls) const

returns the number of samples in a specific class.

Definition at line 175 of file EEGTrainingData.cpp.

Referenced by numSamples().

void EEGTrainingData::set ( unsigned int  cls,
unsigned int  seq,
EEGData data 
)
void EEGTrainingData::setChannelNames ( std::vector< string >  names)

set channel names

Definition at line 236 of file EEGTrainingData.cpp.

void EEGTrainingData::setClassLabels ( std::vector< string >  labels)

set class labels

Definition at line 230 of file EEGTrainingData.cpp.

void EEGTrainingData::setFiltered ( bool  filtered)

set filtered flag

Definition at line 242 of file EEGTrainingData.cpp.

void EEGTrainingData::setSequenceOrder ( std::vector< int >  ord)
inline

set sequence order vector

Definition at line 147 of file EEGTrainingData.hpp.


Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 47 of file EEGTrainingData.hpp.


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