CEBL
2.1
|
#include <CEBLModel.hpp>
CEBLModel::CEBLModel | ( | ) |
Definition at line 23 of file CEBLModel.cpp.
CEBLModel::~CEBLModel | ( | ) |
Definition at line 90 of file CEBLModel.cpp.
bool CEBLModel::channelsConfigFileExists | ( | string | filename | ) |
Checks if specified filename exists.
filename | filename to check |
Definition at line 357 of file CEBLModel.cpp.
References FileUtils::fileExists().
string CEBLModel::channelsGetConfigFilename | ( | ) |
Gets currently loaded config filename.
Definition at line 352 of file CEBLModel.cpp.
References ChannelsConfig::getCurrentFilename().
Referenced by TabEEGRecording::CreateGUI(), and TabEEGRecording::updateView().
string CEBLModel::channelsGetConfigurationString | ( | ) |
Returns string of complete channel configuration file.
Definition at line 392 of file CEBLModel.cpp.
References ChannelsConfig::getConfigurationString().
bool CEBLModel::channelsGetElectrodeEnabled | ( | int | electrode | ) |
Returns enabled status of specified electrode.
electrode | electrode index |
Definition at line 372 of file CEBLModel.cpp.
References ChannelsConfig::getElectrodeEnabled().
Referenced by TabEEGRecording::updateView().
string CEBLModel::channelsGetElectrodeName | ( | int | electrode | ) |
Returns name of specified electrode.
electrode | electrode index |
Definition at line 362 of file CEBLModel.cpp.
References ChannelsConfig::getElectrodeName().
Referenced by TabEEGRecording::updateView().
bool CEBLModel::channelsGetElectrodeReference | ( | int | electrode | ) |
Returns reference status of specified electrode.
electrode | electrode index |
Definition at line 367 of file CEBLModel.cpp.
References ChannelsConfig::getElectrodeReference().
Referenced by TabEEGRecording::updateView().
std::vector< string > CEBLModel::channelsGetEnabledNames | ( | ) |
Gets the list of channel names.
Definition at line 387 of file CEBLModel.cpp.
References ChannelsConfig::getEnabledNames().
int CEBLModel::channelsGetMaxNumChannels | ( | ) |
Maximum number of channels that CEBL can handle.
Definition at line 377 of file CEBLModel.cpp.
References ChannelsConfig::getMaxNumChannels().
Referenced by TabEEGRecording::CreateGUI().
int CEBLModel::channelsGetNumEnabledChannels | ( | ) |
Get number of channels currently enabled.
Definition at line 382 of file CEBLModel.cpp.
References ChannelsConfig::getNumEnabled().
Referenced by EEGMonitor::EEGMonitor().
void CEBLModel::channelsLoadFile | ( | string | filename | ) |
Loads channels configuration file.
filename | file to load |
Definition at line 402 of file CEBLModel.cpp.
References ChannelsConfig::loadFile().
void CEBLModel::channelsSaveFile | ( | string | filename | ) |
Save channels cofnigurationt o file.
filename |
Definition at line 407 of file CEBLModel.cpp.
References ChannelsConfig::saveFile().
void CEBLModel::channelsSetConfigurationFromString | ( | string | config | ) |
Sets channels configuration based on full string of configuration file.
config | full configuration string |
Definition at line 427 of file CEBLModel.cpp.
References ChannelsConfig::setConfigurationFromString().
void CEBLModel::channelsSetElectrodeEnabled | ( | int | electrode, |
bool | enabled | ||
) |
Set enabled flag of specified electrode.
electrode | electrode index |
enabled |
Definition at line 422 of file CEBLModel.cpp.
References ChannelsConfig::setElectrodeEnabled().
void CEBLModel::channelsSetElectrodeName | ( | int | electrode, |
string | name | ||
) |
Set the name of specified electrode.
electrode | electrode index |
name |
Definition at line 412 of file CEBLModel.cpp.
References ChannelsConfig::setElectrodeName().
void CEBLModel::channelsSetElectrodeReference | ( | int | electrode, |
bool | reference | ||
) |
Set reference flag of specified electrode
electrode | electrode index |
reference |
Definition at line 417 of file CEBLModel.cpp.
References ChannelsConfig::setElectrodeReference().
std::vector< std::vector< double > > CEBLModel::classifierGetLastProbs | ( | ) |
Definition at line 901 of file CEBLModel.cpp.
References ClassifiersConfig::getLastProbs().
std::map< std::string, CEBL::Param > CEBLModel::classifierGetParams | ( | string | feature = "" | ) |
Definition at line 886 of file CEBLModel.cpp.
References ClassifiersConfig::getParams().
Referenced by TabClassifiers::updateView().
int CEBLModel::classifierGetTrainedClasses | ( | ) |
Definition at line 906 of file CEBLModel.cpp.
References ClassifiersConfig::getTrainedClasses().
int CEBLModel::classifierGetTrainedLags | ( | ) |
Definition at line 911 of file CEBLModel.cpp.
References ClassifiersConfig::getTrainedLags().
bool CEBLModel::classifierGetUseProbs | ( | ) |
Definition at line 896 of file CEBLModel.cpp.
References ClassifiersConfig::getUseProbs().
void CEBLModel::classifierHaltTrain | ( | ) |
Definition at line 936 of file CEBLModel.cpp.
References ClassifiersConfig::haltTrain().
Referenced by RealTimeClassification::trainClassifierHalt().
bool CEBLModel::classifierIsTrained | ( | string | classifier = "" | ) |
Definition at line 881 of file CEBLModel.cpp.
References ClassifiersConfig::isTrained().
Referenced by RealTimeClassification::isReady(), InfoBar::update(), and TabClassifiers::updateView().
void CEBLModel::classifierReset | ( | CEBL::Param | params, |
string | classifier = "" |
||
) |
Definition at line 920 of file CEBLModel.cpp.
References ClassifiersConfig::reset().
Referenced by TabTraining::onHide().
void CEBLModel::classifierSetParams | ( | std::map< std::string, CEBL::Param > | params, |
string | classifier = "" |
||
) |
Definition at line 941 of file CEBLModel.cpp.
References ClassifiersConfig::setParams().
Referenced by TabClassifiers::updateModel().
void CEBLModel::classifierSetUseProbs | ( | bool | flag | ) |
Definition at line 946 of file CEBLModel.cpp.
References ClassifiersConfig::setUseProbs().
std::vector< string > CEBLModel::classifiersGetNameList | ( | ) |
Definition at line 871 of file CEBLModel.cpp.
References ClassifiersConfig::getNameList().
Referenced by TabClassifiers::updateView().
std::vector< string > CEBLModel::classifiersGetPathList | ( | ) |
Definition at line 876 of file CEBLModel.cpp.
References ClassifiersConfig::getPathList().
Referenced by TabClassifiers::updateView().
string CEBLModel::classifiersGetSelected | ( | ) |
Definition at line 891 of file CEBLModel.cpp.
References ClassifiersConfig::getSelected().
Referenced by InfoBar::update(), and TabClassifiers::updateView().
void CEBLModel::classifiersSetSelected | ( | string | classifier = "" | ) |
Definition at line 925 of file CEBLModel.cpp.
References ClassifiersConfig::setSelected().
Referenced by main().
void CEBLModel::classifierTrain | ( | EEGTrainingData & | training_data, |
string | classifier = "" |
||
) |
Definition at line 931 of file CEBLModel.cpp.
References ClassifiersConfig::train().
Referenced by main(), and RealTimeClassification::trainClassifier().
ublas::vector< int > CEBLModel::classifierUse | ( | EEGData & | data | ) |
apply classifier to data and get a vector of classes
Definition at line 953 of file CEBLModel.cpp.
References ClassifiersConfig::use().
Referenced by main(), and RealTimeClassification::timeoutFunction().
void CEBLModel::dataClearSamples | ( | ) |
Clear buffered samples.
Definition at line 257 of file CEBLModel.cpp.
References DataSource::clearSamples().
void CEBLModel::dataClearStoredData | ( | ) |
Remove all stored data.
Definition at line 237 of file CEBLModel.cpp.
References DataSource::clearStoredData().
int CEBLModel::dataGetSource | ( | ) |
Get selected source index.
Definition at line 202 of file CEBLModel.cpp.
References DataSource::getSource().
std::vector< string > CEBLModel::dataGetSources | ( | ) |
Get the list of data sources.
Definition at line 197 of file CEBLModel.cpp.
References DataSource::getSources().
EEGData CEBLModel::dataGetStoredData | ( | ) |
Get stored data buffer.
Definition at line 227 of file CEBLModel.cpp.
References DataSource::getStoredData().
bool CEBLModel::dataGetStoreFlag | ( | ) |
Check if data is being buffered as it is read from data source.
Definition at line 217 of file CEBLModel.cpp.
References DataSource::getStoreFlag().
int CEBLModel::dataGetStoreNumSamples | ( | ) |
Get number of stored samples in stored data buffer.
Definition at line 222 of file CEBLModel.cpp.
References DataSource::getStoreNumSamples().
Referenced by TabMonitor::updateView().
bool CEBLModel::dataIsStarted | ( | ) |
Check if data source is currently recording.
Definition at line 212 of file CEBLModel.cpp.
References DataSource::isStarted().
EEGTrainingData CEBLModel::dataLoadTrainingDataFile | ( | string | filename | ) |
Loads training data from a file and returns it.
filename |
Definition at line 1213 of file CEBLModel.cpp.
References DataIO::loadTrainingDataFromFile().
Referenced by main().
EEGData CEBLModel::dataRead | ( | int | samples | ) |
Reads and processes a specified number of samples from data source.
samples | number of samples |
Definition at line 172 of file CEBLModel.cpp.
References DataProcess::process(), and DataSource::readAll().
EEGData CEBLModel::dataReadAll | ( | ) |
Reads and processes all data from data source.
Definition at line 185 of file CEBLModel.cpp.
References DataProcess::process(), and DataSource::readAll().
Referenced by RealTimeClassification::timeoutFunction().
EEGData CEBLModel::dataReadAllRaw | ( | ) |
Reads all data from data source.
Definition at line 179 of file CEBLModel.cpp.
References DataSource::readAll().
EEGData CEBLModel::dataReadRaw | ( | int | samples | ) |
Reads a specified number of samples from data source.
samples | number of samples |
Definition at line 166 of file CEBLModel.cpp.
References DataSource::readAll().
int CEBLModel::dataSamplesAvailable | ( | ) |
Check how many samples are available.
Definition at line 192 of file CEBLModel.cpp.
References DataSource::samplesAvailable().
void CEBLModel::dataSetSource | ( | int | n | ) |
Set data source by index.
n | index of data source |
Definition at line 247 of file CEBLModel.cpp.
References DataSource::setSource().
void CEBLModel::dataSetSource | ( | string | source | ) |
Set data source by name.
source | name of data source |
Definition at line 252 of file CEBLModel.cpp.
References DataSource::setSource().
void CEBLModel::dataSetStoreFlag | ( | bool | flag | ) |
Set flag indicating whether or not to store data as it is read from data source.
flag |
Definition at line 242 of file CEBLModel.cpp.
References DataSource::setStoreFlag().
Referenced by TabMonitor::onHide().
bool CEBLModel::dataSourceReady | ( | ) |
Check if data source is ready.
Definition at line 207 of file CEBLModel.cpp.
References DataSource::sourceReady().
void CEBLModel::dataStart | ( | ) |
Start the data source recording.
Definition at line 262 of file CEBLModel.cpp.
References DataSource::start().
Referenced by RealTimeClassification::startClassifying().
void CEBLModel::dataStop | ( | ) |
Stop the data source recording.
Definition at line 267 of file CEBLModel.cpp.
References DataSource::stop().
Referenced by TabMonitor::onHide(), and RealTimeClassification::stopClassifying().
std::vector< double > CEBLModel::decisionDecideClasses | ( | ) |
Get proportions for each class. The result of this calls should be used to set the proportions for each class in the visual interface.
Definition at line 858 of file CEBLModel.cpp.
References DecisionConfig::decideClasses().
std::vector< string > CEBLModel::decisionGetNameList | ( | ) |
Get list of names for loaded decision plugins.
Definition at line 795 of file CEBLModel.cpp.
References DecisionConfig::getNameList().
Referenced by TabDecision::updateView().
std::map< std::string, CEBL::Param > CEBLModel::decisionGetParams | ( | string | decision = "" | ) |
Get parameters for specified or selected decision.
decision | name of decision or "" for selected decison. |
Definition at line 810 of file CEBLModel.cpp.
References DecisionConfig::getParams().
Referenced by TabDecision::updateView().
std::vector< string > CEBLModel::decisionGetPathList | ( | ) |
Get list of paths for loaded decision plugins.
Definition at line 800 of file CEBLModel.cpp.
References DecisionConfig::getPathList().
Referenced by TabDecision::updateView().
string CEBLModel::decisionGetSelected | ( | ) |
Get name of selected decision plugin.
Definition at line 805 of file CEBLModel.cpp.
References DecisionConfig::getSelected().
Referenced by TabDecision::updateView().
void CEBLModel::decisionInit | ( | int | num_classes | ) |
Initialize selected decision library.
num_classes |
Definition at line 853 of file CEBLModel.cpp.
References DecisionConfig::init().
Referenced by RealTimeClassification::startClassifying().
void CEBLModel::decisionSetParams | ( | std::map< std::string, CEBL::Param > | params, |
string | decision = "" |
||
) |
Set parameters of specified or selected decision plugin.
params | parameters for specified decision |
decision | name of decision or "" for selected decison. |
Definition at line 825 of file CEBLModel.cpp.
References DecisionConfig::setParams().
Referenced by TabDecision::updateModel().
void CEBLModel::decisionSetSelected | ( | string | decision = "" | ) |
Set decision by name which will be used.
decision | name of decision |
Definition at line 820 of file CEBLModel.cpp.
References DecisionConfig::setSelected().
void CEBLModel::decisionUpdateWithClassification | ( | ublas::vector< int > | classes | ) |
Update decision from classification for multiple samples. Same as calling decisionUpdateWithClassification(int) for each sample.
classes | should be of length nSamples |
Definition at line 843 of file CEBLModel.cpp.
void CEBLModel::decisionUpdateWithClassification | ( | int | cls | ) |
Update decision with classification for a single sample.
cls | class the sampled has been classified as |
Definition at line 848 of file CEBLModel.cpp.
References DecisionConfig::updateWithClassification().
void CEBLModel::decisionUpdateWithProbabilities | ( | std::vector< std::vector< double > > | probs | ) |
Update decision with probabilities for several samples. This function is identical to calling decisionUpdateWithProbabilities for each sample's probabilities.
probs | should be NSAMPLES x NCLASSES |
Definition at line 832 of file CEBLModel.cpp.
void CEBLModel::decisionUpdateWithProbabilities | ( | std::vector< double > | probs | ) |
Update decision with probabilities for a single sample.
probs | probabilities for each class should be of size NCLASSES |
Definition at line 837 of file CEBLModel.cpp.
References DecisionConfig::updateWithProbabilities().
bool CEBLModel::deviceExists | ( | ) |
Check if selected device file exists.
Definition at line 475 of file CEBLModel.cpp.
References DeviceConfig::exists().
Referenced by CEBLViewCLI::Start().
int CEBLModel::deviceGetBlockSize | ( | ) |
Get block size currently selected by the device.
Definition at line 470 of file CEBLModel.cpp.
References DeviceConfig::getBlockSize().
string CEBLModel::deviceGetError | ( | ) |
Get string of errors from device configuration.
Definition at line 455 of file CEBLModel.cpp.
References DeviceConfig::getError().
Referenced by CEBLViewCLI::Start(), and TabDevice::updateView().
string CEBLModel::deviceGetInquiry | ( | ) |
Get inquiry string from mindset device.
Definition at line 460 of file CEBLModel.cpp.
References DeviceConfig::getInquiry().
Referenced by TabDevice::updateView().
string CEBLModel::deviceGetLocation | ( | ) |
Get the location of the mindset device file.
Definition at line 445 of file CEBLModel.cpp.
References DeviceConfig::getLocation().
Referenced by CEBLViewCLI::Start(), and TabDevice::updateView().
int CEBLModel::deviceGetSampleRate | ( | ) |
Get sample rate currently selected by the device.
Definition at line 465 of file CEBLModel.cpp.
References DeviceConfig::getSampleRate().
bool CEBLModel::deviceIsReady | ( | ) |
Check if mindset is ready to record.
Definition at line 450 of file CEBLModel.cpp.
References DeviceConfig::isReady().
Referenced by TabDevice::updateView().
void CEBLModel::deviceSearch | ( | ) |
Search for a valid mindset device file and try to connect to it.
Definition at line 500 of file CEBLModel.cpp.
References DeviceConfig::scanForDevices().
void CEBLModel::deviceSetBlockSize | ( | int | block_size | ) |
Set the block size used to collect samples in the device.
block_size |
Definition at line 495 of file CEBLModel.cpp.
References DeviceConfig::setBlockSize().
void CEBLModel::deviceSetDeviceLocation | ( | string | filename | ) |
Set the device file location
filename |
Definition at line 485 of file CEBLModel.cpp.
References DeviceConfig::setDeviceLocation().
void CEBLModel::deviceSetSampleRate | ( | int | sample_rate | ) |
Set the sample rate the device is recording at.
sample_rate |
Definition at line 490 of file CEBLModel.cpp.
References DeviceConfig::setSampleRate().
std::map< std::string, CEBL::Param > CEBLModel::featureGetParams | ( | string | feature = "" | ) |
Get list of parameters for specified feature.
feature | feature name or "" to use selected feature |
Definition at line 740 of file CEBLModel.cpp.
References FeaturesConfig::getParams().
Referenced by main(), InfoBar::update(), and TabFeatures::updateView().
bool CEBLModel::featureIsTrained | ( | string | feature = "" | ) |
Check if specified feature has been trained. If feature does not require training, this will return true.
feature | feature name or "" to use selected feature |
Definition at line 730 of file CEBLModel.cpp.
References FeaturesConfig::isTrained().
Referenced by TabFeatures::updateView().
void CEBLModel::featureReset | ( | string | feature = "" | ) |
Reset specified, or selected, feature.
feature | feature name or "" to use selected feature |
Definition at line 760 of file CEBLModel.cpp.
References FeaturesConfig::reset().
Referenced by RealTimeClassification::trainClassifier().
void CEBLModel::featureSetParams | ( | std::map< std::string, CEBL::Param > | params, |
string | feature = "" |
||
) |
Set params for selected or specified feature.
params | list of set params |
feature | feature name or "" to use selected feature |
Definition at line 765 of file CEBLModel.cpp.
References FeaturesConfig::setParams().
Referenced by main(), and TabFeatures::updateModel().
Extract features from data and return the result. You must have already trained selected feature if necessary. Note that the returned data will most likely be of a different dimensionality from the input data.
data |
Definition at line 773 of file CEBLModel.cpp.
References FeaturesConfig::extract().
Referenced by main(), RealTimeClassification::timeoutFunction(), and RealTimeClassification::trainClassifier().
EEGTrainingData CEBLModel::featuresExtract | ( | EEGTrainingData & | data | ) |
Extract features from training data structure.
data |
Definition at line 777 of file CEBLModel.cpp.
References FeaturesConfig::extract().
std::vector< string > CEBLModel::featuresGetNameList | ( | ) |
Gets the list of loaded feature libraries.
Definition at line 720 of file CEBLModel.cpp.
References FeaturesConfig::getNameList().
Referenced by TabFeatures::updateView().
std::vector< string > CEBLModel::featuresGetPathList | ( | ) |
Gets the full path of all loaded feature libraries.
Definition at line 725 of file CEBLModel.cpp.
References FeaturesConfig::getPathList().
Referenced by TabFeatures::updateView().
string CEBLModel::featuresGetSelected | ( | ) |
Get the name of the selected feature.
Definition at line 735 of file CEBLModel.cpp.
References FeaturesConfig::getSelected().
Referenced by InfoBar::update(), and TabFeatures::updateView().
void CEBLModel::featuresHalt | ( | ) |
Halt feature extraction. This is expected to be called from a separate thread than the one extracting the features. Note that this may not halt the process immediatly. All features have a flag to halt and specified inturruption points. Calling this function will cause selected feature to halt when it reaches the next inturruption point.
Definition at line 782 of file CEBLModel.cpp.
References FeaturesConfig::halt().
Referenced by RealTimeClassification::trainClassifierHalt().
void CEBLModel::featuresSetSelected | ( | string | feature = "" | ) |
Set selected feature by name.
feature |
Definition at line 750 of file CEBLModel.cpp.
References FeaturesConfig::setSelected().
Referenced by main().
void CEBLModel::featureTrain | ( | string | feature = "" | ) |
Train specified, or selected, feature.
feature | feature name or "" to use selected feature |
Definition at line 755 of file CEBLModel.cpp.
References FeaturesConfig::train().
EEGData & CEBLModel::fileStreamGetData | ( | ) |
Get flattened eeg data object of all the samples in the selected file
Definition at line 559 of file CEBLModel.cpp.
References FileDataStreamConfig::getData().
string CEBLModel::fileStreamGetFilename | ( | ) |
Get file currently loaded by file stream. This is where data will be streamed from.
Definition at line 519 of file CEBLModel.cpp.
References FileDataStreamConfig::getFilename().
Referenced by TabDevice::updateView().
int CEBLModel::fileStreamGetNumChannels | ( | ) |
Get number of channels in the data from selected file.
Definition at line 539 of file CEBLModel.cpp.
References FileDataStreamConfig::getNumChannels().
Referenced by TabDevice::updateView().
int CEBLModel::fileStreamGetNumClasses | ( | ) |
Get number of classes the file data is organized into.
Definition at line 544 of file CEBLModel.cpp.
References FileDataStreamConfig::getNumClasses().
Referenced by TabDevice::updateView().
int CEBLModel::fileStreamGetNumSamples | ( | ) |
Get number of samples available from the file.
Definition at line 534 of file CEBLModel.cpp.
References FileDataStreamConfig::getNumSamples().
Referenced by TabDevice::updateView().
int CEBLModel::fileStreamGetNumSequences | ( | ) |
Get number of sequences the file data is organized into.
\return sequences
Definition at line 549 of file CEBLModel.cpp.
References FileDataStreamConfig::getNumSequences().
Referenced by TabDevice::updateView().
int CEBLModel::fileStreamGetSampleRate | ( | ) |
Get sample rate that samples will be read from file data.
Definition at line 529 of file CEBLModel.cpp.
References FileDataStreamConfig::getSampleRate().
Referenced by TabDevice::updateView().
EEGTrainingData & CEBLModel::fileStreamGetTrainingData | ( | ) |
Get training data object being used by file stream.
Definition at line 554 of file CEBLModel.cpp.
References FileDataStreamConfig::getTrainingData().
bool CEBLModel::fileStreamIsReady | ( | ) |
Check if the file stream is ready to return data.
Definition at line 524 of file CEBLModel.cpp.
References FileDataStreamConfig::isReady().
void CEBLModel::fileStreamOpenFile | ( | string | filename | ) |
Open a file for streaming.
filename |
Definition at line 569 of file CEBLModel.cpp.
References FileDataStreamConfig::openFile().
void CEBLModel::fileStreamSetSampleRate | ( | int | sample_rate | ) |
Set sample rate to read data at.
sample_rate |
Definition at line 574 of file CEBLModel.cpp.
References FileDataStreamConfig::setSampleRate().
Apply filter to data and return filtered data.
data |
Definition at line 671 of file CEBLModel.cpp.
References FilterConfig::apply().
Extracts components from collected data set
training_data | data to extract components from |
Definition at line 656 of file CEBLModel.cpp.
References FilterConfig::getComponents().
ublas::matrix< double > CEBLModel::filterGetFilterMatrix | ( | ) |
Get the internal filter matrix.
Definition at line 681 of file CEBLModel.cpp.
References FilterConfig::getFilterMatrix().
std::vector< string > CEBLModel::filterGetNameList | ( | ) |
Get names of filter libraries available.
Definition at line 626 of file CEBLModel.cpp.
References FilterConfig::getNameList().
Referenced by TabFilter::updateView().
int CEBLModel::filterGetNumExpectedChannels | ( | ) |
Return the number of channels trained filter expects to recieve.
Definition at line 676 of file CEBLModel.cpp.
References FilterConfig::getNumExpectedChannels().
int CEBLModel::filterGetNumLags | ( | ) |
Check how many lags are being used to filter data.
Definition at line 641 of file CEBLModel.cpp.
References FilterConfig::getNumLags().
Referenced by TabFilter::updateView().
std::vector< string > CEBLModel::filterGetPathList | ( | ) |
Get paths of filter libraries available.
Definition at line 631 of file CEBLModel.cpp.
References FilterConfig::getPathList().
Referenced by TabFilter::updateView().
string CEBLModel::filterGetSelected | ( | ) |
Get name of selected filter.
Definition at line 646 of file CEBLModel.cpp.
References FilterConfig::getSelected().
Referenced by TabFilter::updateView().
std::vector< int > CEBLModel::filterGetSelectedComponents | ( | ) |
Get list of components selected to be filtered out.
Definition at line 651 of file CEBLModel.cpp.
References FilterConfig::getSelectedComponents().
string CEBLModel::filterGetSelectedComponentsString | ( | ) |
Get a string of all components being removed.
Definition at line 661 of file CEBLModel.cpp.
References FilterConfig::getSelectedComponentsString().
Referenced by TabFilter::updateView().
bool CEBLModel::filterGetSelectedComponentsValid | ( | ) |
Check if selected set of components are within range.
Definition at line 666 of file CEBLModel.cpp.
References FilterConfig::getSelectedComponentsValid().
Referenced by TabFilter::updateView().
bool CEBLModel::filterIsTrained | ( | string | filter = "" | ) |
Check if specified filter is trained. If the filter does not need to be trained, this will return true as well.
filter | name of filter or "" for selected filter |
Definition at line 636 of file CEBLModel.cpp.
References FilterConfig::isTrained().
Referenced by TabFilter::updateView().
void CEBLModel::filterSetNumLags | ( | int | n | ) |
Set number of lags filter uses.
n |
Definition at line 706 of file CEBLModel.cpp.
References FilterConfig::setNumLags().
void CEBLModel::filterSetSelected | ( | string | filter = "" | ) |
Set selected filter by name.
filter | name of filter or "" for selected filter |
Definition at line 696 of file CEBLModel.cpp.
References FilterConfig::setSelected().
void CEBLModel::filterSetSelectedComponentsString | ( | string | components | ) |
Set selected components to filter out by string. String can contain numbers separated by commas, or ranges indicated with colons. E.g. "3,5,7:13,18".
components |
Definition at line 691 of file CEBLModel.cpp.
References FilterConfig::setSelectedComponentsString().
Referenced by TabFilter::updateView().
void CEBLModel::filterTrain | ( | EEGData | training_data, |
string | filter = "" |
||
) |
Train specified filter removing selected components.
filter | name of filter or "" for selected filter |
Definition at line 701 of file CEBLModel.cpp.
References FilterConfig::train().
|
inline |
Definition at line 78 of file CEBLModel.hpp.
|
inline |
Definition at line 86 of file CEBLModel.hpp.
|
inline |
Definition at line 82 of file CEBLModel.hpp.
Referenced by FilterConfig::getComponents(), and FilterConfig::train().
|
inline |
Definition at line 81 of file CEBLModel.hpp.
|
inline |
Definition at line 85 of file CEBLModel.hpp.
|
inline |
Definition at line 79 of file CEBLModel.hpp.
|
inline |
Definition at line 84 of file CEBLModel.hpp.
|
inline |
Definition at line 80 of file CEBLModel.hpp.
|
inline |
Definition at line 83 of file CEBLModel.hpp.
|
inline |
Definition at line 87 of file CEBLModel.hpp.
Referenced by ChannelsConfig::ChannelsConfig().
const char * CEBLModel::getString | ( | string | name | ) |
Definition at line 143 of file CEBLModel.cpp.
References StringTable::getString().
|
inline |
Definition at line 88 of file CEBLModel.hpp.
|
inline |
Definition at line 76 of file CEBLModel.hpp.
Referenced by main().
void CEBLModel::InitModel | ( | int | ac, |
char ** | av | ||
) |
Definition at line 32 of file CEBLModel.cpp.
References Preferences::getSessionFilename(), Preferences::initCEBL(), StringTable::loadFromString(), Preferences::processCL(), sessionLoad(), and string_table_en.
Referenced by main().
void CEBLModel::preferencesAddOption | ( | string | name, |
string | description, | ||
char | short_name = '\0' |
||
) |
Add an option to preferences which can be set via the command lien
name | name of option |
description | |
short_name | one-letter name for option |
Definition at line 128 of file CEBLModel.cpp.
References Preferences::addOption().
Referenced by main().
string CEBLModel::preferencesGetOption | ( | string | name | ) |
Get the value of a set option.
name |
Definition at line 135 of file CEBLModel.cpp.
References Preferences::getOption().
Referenced by main().
std::vector< std::string > CEBLModel::preferencesGetPaths | ( | ) |
Definition at line 123 of file CEBLModel.cpp.
References Preferences::getPaths().
Referenced by ClassifiersConfig::ClassifiersConfig(), DecisionConfig::DecisionConfig(), FeaturesConfig::FeaturesConfig(), and FilterConfig::FilterConfig().
void CEBLModel::preferencesInitCEBL | ( | ) |
Definition at line 118 of file CEBLModel.cpp.
References Preferences::initCEBL().
void CEBLModel::preferencesProcessCL | ( | int | ac, |
char ** | av | ||
) |
Definition at line 113 of file CEBLModel.cpp.
References Preferences::processCL().
EEGTrainingData CEBLModel::processData | ( | EEGTrainingData & | data | ) |
Process all the data in a training data structure.
data |
Definition at line 324 of file CEBLModel.cpp.
References DataProcess::process().
Referenced by RealTimeClassification::trainClassifier().
Processes data based on enabled flags.
data | reference to eeg data |
Definition at line 329 of file CEBLModel.cpp.
References DataProcess::process().
EEGData & CEBLModel::processData | ( | EEGData & | data, |
bool | remove_disabled, | ||
bool | reference, | ||
bool | filter | ||
) |
Processes data based on parameters.
data | reference to eeg data to process |
remove_disabled | remove disabled channels from data |
reference | reference channels against ones with reference flag |
filter | filter the data |
Definition at line 334 of file CEBLModel.cpp.
References DataProcess::process().
bool CEBLModel::processGetFilterEnabled | ( | ) |
Get filter flag.
Definition at line 295 of file CEBLModel.cpp.
References DataProcess::getFilterEnabled().
Referenced by TabMonitor::updateView().
bool CEBLModel::processGetReferenceEnabled | ( | ) |
Get reference status.
Definition at line 285 of file CEBLModel.cpp.
References DataProcess::getReferenceEnabled().
bool CEBLModel::processGetRemoveEnabled | ( | ) |
Get enabled status.
Definition at line 290 of file CEBLModel.cpp.
References DataProcess::getRemoveEnabled().
void CEBLModel::processSetFilterEnabled | ( | bool | enabled | ) |
Set filter flag in process.
enabled |
Definition at line 315 of file CEBLModel.cpp.
References DataProcess::setFilterEnabled().
void CEBLModel::processSetReferenceEnabled | ( | bool | enabled | ) |
Set reference flag in process.
enabled |
Definition at line 305 of file CEBLModel.cpp.
References DataProcess::setReferenceEnabled().
void CEBLModel::processSetRemoveEnabled | ( | bool | enabled | ) |
Set remove disabled flag in process.
enabled |
Definition at line 310 of file CEBLModel.cpp.
References DataProcess::setRemoveEnabled().
void CEBLModel::realtimeClearClassificationQueue | ( | ) |
Clear the queue of classified samples.
Definition at line 1169 of file CEBLModel.cpp.
References RealTimeClassification::clearClassificationQueue().
void CEBLModel::realtimeClearSelectedClass | ( | ) |
Indicate that the selected class has been read.
Definition at line 1205 of file CEBLModel.cpp.
References RealTimeClassification::clearSelectedClass().
std::vector< double > CEBLModel::realtimeGetClassProportions | ( | ) |
Get proportions for each class.
Definition at line 1148 of file CEBLModel.cpp.
References RealTimeClassification::getClassProportions().
int CEBLModel::realtimeGetSelectedClass | ( | ) | const |
Get last selected class or -1 if there is none.
Definition at line 1158 of file CEBLModel.cpp.
References RealTimeClassification::getSelectedClass().
bool CEBLModel::realtimeIsClassifying | ( | ) |
Check if realtime classification system is currently classifying.
Definition at line 1138 of file CEBLModel.cpp.
References RealTimeClassification::isClassifying().
bool CEBLModel::realtimeIsReady | ( | ) |
Check if realtime classification system is ready to start classifying.
Definition at line 1128 of file CEBLModel.cpp.
References RealTimeClassification::isReady().
bool CEBLModel::realtimeIsTrainingClassifier | ( | ) |
Check if classifier is being trained .
Definition at line 1201 of file CEBLModel.cpp.
References RealTimeClassification::isTrainingClassifier().
bool CEBLModel::realtimeLastTrainFailed | ( | ) |
Check if last training processed failed.
Definition at line 1133 of file CEBLModel.cpp.
References RealTimeClassification::lastTrainFailed().
std::vector< int > CEBLModel::realtimePeekClassificationQueue | ( | ) | const |
Reads the queue of classified samples without clearing the queue.
Definition at line 1153 of file CEBLModel.cpp.
References RealTimeClassification::peekClassificationQueue().
std::vector< int > CEBLModel::realtimeReadClassificationQueue | ( | ) |
Reads the queue of classified samples and clears the queue.
Definition at line 1143 of file CEBLModel.cpp.
References RealTimeClassification::readClassificationQueue().
void CEBLModel::realtimeStartClassifying | ( | ) |
Start the classification and adding to queue.
Definition at line 1181 of file CEBLModel.cpp.
References RealTimeClassification::startClassifying().
void CEBLModel::realtimeStopClassifying | ( | ) |
Stop the classification.
Definition at line 1186 of file CEBLModel.cpp.
References RealTimeClassification::stopClassifying().
void CEBLModel::realtimeTrainClassifier | ( | ) |
Train the selected classifier on training data.
Definition at line 1176 of file CEBLModel.cpp.
References RealTimeClassification::trainClassifier().
void CEBLModel::realtimeTrainClassifierHalt | ( | ) |
Stop the threaded classifier training.
Definition at line 1196 of file CEBLModel.cpp.
References RealTimeClassification::trainClassifierHalt().
void CEBLModel::realtimeTrainClassifierThreaded | ( | ) |
Train the classifier in separate thread.
Definition at line 1191 of file CEBLModel.cpp.
References RealTimeClassification::trainClassifierThreaded().
void CEBLModel::sessionLoad | ( | string | filename | ) |
Load session from specifiedfile.
filename |
Definition at line 611 of file CEBLModel.cpp.
References SessionManager::load().
Referenced by InitModel().
void CEBLModel::sessionSave | ( | ) |
Update the session and save it to the selected file.
Definition at line 601 of file CEBLModel.cpp.
References SessionManager::save().
void CEBLModel::sessionSaveAs | ( | string | filename | ) |
Update the session and ave it to specified file.
filename |
Definition at line 606 of file CEBLModel.cpp.
References SessionManager::saveAs().
bool CEBLModel::sessionShouldSaveAs | ( | ) |
Check if session needs to have a filename specified. Otherwise we can just save the session to the previously loaded/saved file.
Definition at line 592 of file CEBLModel.cpp.
References SessionManager::shouldSaveAs().
void CEBLModel::trainingClearData | ( | ) |
bool CEBLModel::trainingDataIsLoaded | ( | ) |
Is data ready, either from a file or from training session.
Definition at line 999 of file CEBLModel.cpp.
References Training::dataIsLoaded().
Referenced by InfoBar::update(), and TabTraining::updateView().
bool CEBLModel::trainingFailed | ( | ) |
Did training fail.
Definition at line 1019 of file CEBLModel.cpp.
References Training::failed().
bool CEBLModel::trainingFeedbackEnabled | ( | ) |
Check if classification feedback is enabled.
Definition at line 1044 of file CEBLModel.cpp.
References Training::feedbackEnabled().
Referenced by TabTraining::updateView().
string CEBLModel::trainingGetClassLabel | ( | int | class_num | ) |
Get the label of a specific class .
class_num |
Definition at line 969 of file CEBLModel.cpp.
References Training::getClassLabel().
std::vector< string > CEBLModel::trainingGetClassLabels | ( | ) |
Get the labels of the classes.
Definition at line 964 of file CEBLModel.cpp.
References Training::getClassLabels().
Referenced by InterfaceCombo::getInterface().
std::vector< double > CEBLModel::trainingGetClassProportions | ( | ) |
Get proportions for each class.
Definition at line 1052 of file CEBLModel.cpp.
References Training::getClassProportions().
EEGTrainingData CEBLModel::trainingGetData | ( | ) |
Get the currently loaded data.
Definition at line 994 of file CEBLModel.cpp.
References Training::getData().
Referenced by RealTimeClassification::trainClassifier(), and TabTraining::updateView().
string CEBLModel::trainingGetDataFilename | ( | ) |
Get filename of loaded training datafile.
Definition at line 1009 of file CEBLModel.cpp.
References Training::getDataFilename().
Referenced by TabTraining::updateView().
string CEBLModel::trainingGetFailureMessage | ( | ) |
Get failure message.
Definition at line 1024 of file CEBLModel.cpp.
References Training::getFailureMessage().
int CEBLModel::trainingGetNumClasses | ( | ) |
Get number of classes to train on.
Definition at line 974 of file CEBLModel.cpp.
References Training::getNumClasses().
Referenced by InterfaceCombo::getInterface(), TabTraining::onHide(), RealTimeClassification::startClassifying(), InfoBar::update(), and TabTraining::updateView().
int CEBLModel::trainingGetNumSequences | ( | ) |
Get the number of sequences to train on.
Definition at line 979 of file CEBLModel.cpp.
References Training::getNumSequences().
Referenced by TabTraining::updateView().
int CEBLModel::trainingGetPauseLength | ( | ) |
Get length of pause between sequences.
Definition at line 989 of file CEBLModel.cpp.
References Training::getPauseLength().
Referenced by TabTraining::updateView().
int CEBLModel::trainingGetSequenceLength | ( | ) |
Get length of each training sequence in seconds.
Definition at line 984 of file CEBLModel.cpp.
References Training::getSequenceLength().
Referenced by TabTraining::updateView().
int CEBLModel::trainingGetTrainingClass | ( | ) |
Get the current class being trained.
Definition at line 1034 of file CEBLModel.cpp.
References Training::getTrainingClass().
int CEBLModel::trainingGetTrainingSequence | ( | ) |
Get the current sequence being trained.
Definition at line 1039 of file CEBLModel.cpp.
References Training::getTrainingSequence().
bool CEBLModel::trainingIsActive | ( | ) |
Is training currently occuring.
Definition at line 1014 of file CEBLModel.cpp.
References Training::isActive().
bool CEBLModel::trainingIsDataFileLoaded | ( | ) |
Is a trainig data file loaded.
Definition at line 1004 of file CEBLModel.cpp.
References Training::isDataFileLoaded().
Referenced by TabTraining::updateView().
bool CEBLModel::trainingIsPaused | ( | ) |
Is training paused between sequences.
Definition at line 1029 of file CEBLModel.cpp.
References Training::isPaused().
bool CEBLModel::trainingIsTrainingClassifier | ( | ) |
Check if training process is currently training a classifier.
Definition at line 1048 of file CEBLModel.cpp.
References Training::isTrainingClassifier().
void CEBLModel::trainingLoadData | ( | string | filename | ) |
Load a data file.
filename |
Definition at line 1101 of file CEBLModel.cpp.
References Training::loadData().
void CEBLModel::trainingSaveData | ( | string | filename | ) |
Save the data to a file.
filename |
Definition at line 1111 of file CEBLModel.cpp.
References Training::saveData().
void CEBLModel::trainingSetClassLabel | ( | int | class_number, |
string | label | ||
) |
Set label for a specific class.
class_number | |
label |
Definition at line 1096 of file CEBLModel.cpp.
References Training::setClassLabel().
void CEBLModel::trainingSetClassLabels | ( | std::vector< string > | labels | ) |
Set class labels.
labels |
Definition at line 1091 of file CEBLModel.cpp.
References Training::setClassLabels().
void CEBLModel::trainingSetFeedbackEnabled | ( | bool | flag | ) |
Set whether or not to provide classification feedback.
flag |
Definition at line 1116 of file CEBLModel.cpp.
References Training::setFeedbackEnabled().
void CEBLModel::trainingSetNumClasses | ( | int | n | ) |
Set number of classes to train on.
n |
Definition at line 1071 of file CEBLModel.cpp.
References Training::setNumClasses().
void CEBLModel::trainingSetNumSequences | ( | int | n | ) |
Set the number of sequences to train on.
n |
Definition at line 1076 of file CEBLModel.cpp.
References Training::setNumSequences().
void CEBLModel::trainingSetPauseLength | ( | int | n | ) |
Set the length of pause between each sequence.
n |
Definition at line 1086 of file CEBLModel.cpp.
References Training::setPauseLength().
void CEBLModel::trainingSetSequenceLength | ( | int | n | ) |
Set the length of each training sequence in seconds.
n |
Definition at line 1081 of file CEBLModel.cpp.
References Training::setSequenceLength().
void CEBLModel::trainingStart | ( | ) |
Start the training process.
Definition at line 1061 of file CEBLModel.cpp.
References Training::start().
void CEBLModel::trainingStop | ( | ) |
Stop the training process.
Definition at line 1066 of file CEBLModel.cpp.
References Training::stop().