CEBL  2.1
Public Member Functions | Friends
Training Class Reference

#include <Training.hpp>

Public Member Functions

 Training (CEBLModel *)
 ~Training ()
std::vector< string > getClassLabels ()
 get the labels of the classes
string getClassLabel (int class_num)
 get the label of a specific class
int getNumClasses ()
 get number of classes to train on
int getNumSequences ()
 get the number of sequences to train on
int getSequenceLength ()
 get length of each training sequence in seconds
int getPauseLength ()
 get length of pause between each sequence
EEGTrainingData getData ()
 get the currently loaded data
bool dataIsLoaded ()
 is data ready, either from a file or from session
bool isDataFileLoaded ()
 is a trainig data file loaded
string getDataFilename ()
 get filename of loaded datafile
bool isActive ()
 is training currently occuring
bool failed ()
 did training fail
string getFailureMessage ()
 get failure message
bool isPaused ()
 is training paused between sequences
int getTrainingClass ()
 get the current class being trained
int getTrainingSequence ()
 get the current sequence being trained
void start ()
 start the training process
void stop ()
 ! stop the process
void setNumClasses (int)
 set number of classes to train on
void setNumSequences (int)
 set the number of sequences to train on
void setSequenceLength (int)
 set the length of each sequence in seconds
void setPauseLength (int)
 set the length of pause between each sequence
void setClassLabels (std::vector< string > labels)
 set class labels
void setClassLabel (int class_number, string label)
 set label for a specific class
void loadData (string filename)
 load a data file
void clearData ()
 clear loaded data
void saveData (string filename)
 save data to a file
bool feedbackEnabled ()
void setFeedbackEnabled (bool flag)
bool isTrainingClassifier ()
std::vector< double > getClassProportions ()
- Public Member Functions inherited from TimeoutThread
 TimeoutThread ()
virtual ~TimeoutThread ()
bool isHalted ()
bool isStarted ()
double getTimeoutLength ()
 get length of timeout in milliseconds
void setTimeoutLength (double l)
 set length of timeotu in milliseconds

Friends

class SessionManager

Additional Inherited Members

- Protected Member Functions inherited from TimeoutThread
void timeoutStart ()
 start the thread
void haltAndJoin ()
 halt the thread and wait for it to finish
void sleep (double stime)
 sleep for stime in milliseconds
- Protected Attributes inherited from TimeoutThread
boost::thread * updater_thread
 the thread object
bool is_started
 flag to indicate whether or not the thread is started
bool halt
 flag to order thread to halt on next iteration
bool halted
 flag to indicate whether or not thread has hlated
boost::mutex thread_lock
 mutex to lock the thread
double timeout_length
 how often updater is called

Detailed Description

Definition at line 40 of file Training.hpp.


Constructor & Destructor Documentation

Training::Training ( CEBLModel model)

Definition at line 22 of file Training.cpp.

Training::~Training ( )

Definition at line 57 of file Training.cpp.


Member Function Documentation

void Training::clearData ( )

clear loaded data

Definition at line 202 of file Training.cpp.

Referenced by CEBLModel::trainingClearData().

bool Training::dataIsLoaded ( )

is data ready, either from a file or from session

Definition at line 103 of file Training.cpp.

Referenced by CEBLModel::trainingDataIsLoaded().

bool Training::failed ( )

did training fail

Definition at line 123 of file Training.cpp.

Referenced by CEBLModel::trainingFailed().

bool Training::feedbackEnabled ( )
inline

Definition at line 183 of file Training.hpp.

Referenced by CEBLModel::trainingFeedbackEnabled().

string Training::getClassLabel ( int  class_num)

get the label of a specific class

Definition at line 73 of file Training.cpp.

Referenced by CEBLModel::trainingGetClassLabel().

std::vector< string > Training::getClassLabels ( )

get the labels of the classes

Definition at line 68 of file Training.cpp.

Referenced by CEBLModel::trainingGetClassLabels().

std::vector<double> Training::getClassProportions ( )
inline

Definition at line 186 of file Training.hpp.

Referenced by CEBLModel::trainingGetClassProportions().

EEGTrainingData Training::getData ( )

get the currently loaded data

Definition at line 98 of file Training.cpp.

Referenced by CEBLModel::trainingGetData().

string Training::getDataFilename ( )

get filename of loaded datafile

Definition at line 113 of file Training.cpp.

Referenced by CEBLModel::trainingGetDataFilename().

string Training::getFailureMessage ( )

get failure message

Definition at line 128 of file Training.cpp.

Referenced by CEBLModel::trainingGetFailureMessage().

int Training::getNumClasses ( )

get number of classes to train on

Definition at line 78 of file Training.cpp.

Referenced by CEBLModel::trainingGetNumClasses().

int Training::getNumSequences ( )

get the number of sequences to train on

Definition at line 83 of file Training.cpp.

Referenced by CEBLModel::trainingGetNumSequences().

int Training::getPauseLength ( )

get length of pause between each sequence

Definition at line 93 of file Training.cpp.

Referenced by CEBLModel::trainingGetPauseLength().

int Training::getSequenceLength ( )

get length of each training sequence in seconds

Definition at line 88 of file Training.cpp.

Referenced by CEBLModel::trainingGetSequenceLength().

int Training::getTrainingClass ( )

get the current class being trained

Definition at line 138 of file Training.cpp.

Referenced by CEBLModel::trainingGetTrainingClass().

int Training::getTrainingSequence ( )

get the current sequence being trained

Definition at line 143 of file Training.cpp.

Referenced by CEBLModel::trainingGetTrainingSequence().

bool Training::isActive ( )

is training currently occuring

Definition at line 118 of file Training.cpp.

Referenced by CEBLModel::trainingIsActive().

bool Training::isDataFileLoaded ( )

is a trainig data file loaded

Definition at line 108 of file Training.cpp.

Referenced by CEBLModel::trainingIsDataFileLoaded().

bool Training::isPaused ( )

is training paused between sequences

Definition at line 133 of file Training.cpp.

Referenced by CEBLModel::trainingIsPaused().

bool Training::isTrainingClassifier ( )

Definition at line 471 of file Training.cpp.

Referenced by CEBLModel::trainingIsTrainingClassifier().

void Training::loadData ( string  filename)

load a data file

Definition at line 194 of file Training.cpp.

References DataIO::loadTrainingDataFromFile().

Referenced by CEBLModel::trainingLoadData().

void Training::saveData ( string  filename)

save data to a file

Definition at line 208 of file Training.cpp.

References DataIO::saveTrainingDataToFile(), and DataIO::saveTrainingSessionToFile().

Referenced by CEBLModel::trainingSaveData().

void Training::setClassLabel ( int  class_number,
string  label 
)

set label for a specific class

Definition at line 189 of file Training.cpp.

Referenced by CEBLModel::trainingSetClassLabel().

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

set class labels

Definition at line 184 of file Training.cpp.

Referenced by CEBLModel::trainingSetClassLabels().

void Training::setFeedbackEnabled ( bool  flag)
inline

Definition at line 184 of file Training.hpp.

Referenced by CEBLModel::trainingSetFeedbackEnabled().

void Training::setNumClasses ( int  n)

set number of classes to train on

Definition at line 155 of file Training.cpp.

References TextUtils::IntToString().

Referenced by CEBLModel::trainingSetNumClasses().

void Training::setNumSequences ( int  n)

set the number of sequences to train on

Definition at line 169 of file Training.cpp.

Referenced by CEBLModel::trainingSetNumSequences().

void Training::setPauseLength ( int  n)

set the length of pause between each sequence

Definition at line 179 of file Training.cpp.

Referenced by CEBLModel::trainingSetPauseLength().

void Training::setSequenceLength ( int  n)

set the length of each sequence in seconds

Definition at line 174 of file Training.cpp.

Referenced by CEBLModel::trainingSetSequenceLength().

void Training::start ( )

start the training process

Definition at line 233 of file Training.cpp.

Referenced by CEBLModel::trainingStart().

void Training::stop ( )

! stop the process

Definition at line 284 of file Training.cpp.

Referenced by CEBLModel::trainingStop().


Friends And Related Function Documentation

friend class SessionManager
friend

Definition at line 44 of file Training.hpp.


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