Aquila
2.0 prealpha
Cognitive Robotics Architecture
|
#include <som.h>
Public Member Functions | |
SOM (MainWindow *pMainWindow, QString binaryName, QString moduleTitle, QString serverName, int instanceID, int tabID=-1) | |
Constructor. | |
~SOM () | |
Destructor. | |
SOM (Interface *pInterface) | |
Constructor. | |
vector< string > | queryGPU () |
Returns detected GPU devices as a list of their names. | |
void | loadTrainingSet (Bottle portData=0) |
Loads training data. | |
void | randomiseWeights () |
Randomises self-organising map's weights. | |
void | saveMap () |
Saves trained self-organising map. | |
void | printOptions () |
Prints options. | |
void | printGPUProperties (int deviceID) |
Prints properties of a given GPU devices. | |
void | setGPUMode (bool gpuMode) |
Sets GPU mode. | |
void | setDebugMessages (int level) |
Sets debug message mode. | |
void | setDevice (int device) |
Sets current GPU device. | |
void | setSeed (int value) |
Sets seed for random number generation. | |
void | setMaxThreads (int threads) |
Sets maximum number of threads per blocks. | |
void | setNumInputs (int inputs) |
Sets the number of inputs of self-organising map. | |
void | setNumSamples (int samples) |
Sets the total number of samples present in the training data. | |
void | setNumOutputs (int outputs) |
Sets the number of outputs of self-organising map. | |
void | setNumSubiterations (int subIterations) |
Sets the number of sub-iterations used during the training. | |
void | setInitLearningRate (float learningRate) |
Sets the initial learning rate used during the training. | |
void | setSigma (float sigma) |
Sets the sigma value used during the training. | |
void | setVisualiseProgress (bool visualise) |
Sets the progress visualisation on/off. | |
void | setIterationPause (int value) |
Sets the iteration pause. | |
void | setNeighbourhoodSize (int value) |
Sets self-organising map's neighbourhood size. | |
void | setNumIterations (int value) |
Sets the number of iterations used during the training. | |
void | setTrainingFile (string fileName) |
Sets the file name containing the training data. | |
void | setMapFile (string fileName) |
Sets the file name used for saving the trained self-organising map. | |
void | getWeightsAsBottle (Bottle *bottle) |
Loads the bottle with self-organising map's weigths. | |
int | getDevice () |
Returns current GPU device. | |
int | getDebugMessages () |
Returns current debug message level. | |
int | getSeed () |
Returns current seed. | |
int | getMaxThreads () |
Returns current maximum number of threads per block. | |
int | getNumInputs () |
Returns current number of inputs. | |
int | getNumSamples () |
Returns current number of samples. | |
int | getNumOutputs () |
Returns current number of outputs. | |
int | getNeighbourhoodSize () |
Returns current neighbourhood size. | |
int | getNumSubiterations () |
Returns current number of sub-iterations. | |
int | getIterationPause () |
Returns current iteration pause value. | |
float | getInitLearningRate () |
Returns current initial learning rate. | |
float | getSigma () |
Returns current sigma. | |
float | getTrainingTime () |
Returns the time it took to train the slef-organising map. | |
float | getLowestDataPoint () |
Returns the lowest data point found in the training data file. | |
float | getHighestDataPoint () |
Returns the highest data point found in the training data file. | |
bool | getVisualiseProgress () |
Returns current progress visualisation mode. | |
string | getTrainingFile () |
Returns the trianing file name. | |
string | getMapFile () |
Returns the file name used for saving the trained self-organising map. | |
Public Member Functions inherited from GUI | |
GUI (MainWindow *pMainWindow, QString binaryName, QString moduleTitle, QString serverName, int instanceID, int tabID=-1) | |
Constructor. | |
~GUI () | |
Destructor. | |
Protected Slots | |
void | about () |
Shows message box with the information about module. | |
void | updateGUI () |
Updates graphical user interface. | |
Protected Slots inherited from GUI | |
virtual void | about () |
Shows message box with the information about module. | |
virtual void | show () |
Shows menu. | |
virtual void | checkFocus (int tabID) |
Checks if the module tab is currently selected. | |
virtual void | statusChanged (int newStatus) |
Updates module based on the new status. | |
virtual void | createMenu () |
Creates menu. | |
virtual void | createEditMenu () |
Creates edit menu. | |
virtual void | createHelpMenu () |
Creates help menu. | |
virtual void | createModuleMenu () |
Creates module menu. | |
virtual void | createDeviceSubmenu () |
Creates device sub-menu. | |
virtual void | updateGUI () |
Updates graphical user interface. | |
virtual void | updateProgressBarClients () |
Updates progress bar clients. | |
virtual void | updateProgressBar (int currentProgress) |
Updates progress bar with the new value. | |
Protected Member Functions | |
void | createFileMenu () |
Creates file menu. | |
void | createSaveSubmenu () |
Creates save menu. | |
Protected Member Functions inherited from GUI | |
void | createStartAction (QMenu *menu, QString actionName, QString statusTip, QString shortcut) |
void | createStopAction (QMenu *menu, QString actionName, QString statusTip, QString shortcut) |
Additional Inherited Members | |
Public Slots inherited from GUI | |
void | setGpu (int deviceID) |
Sets GPU based on user selection. | |
void | setGpuList (QStringList gpuList) |
Sets GPU list and subsequently calls a function that constructs device sub-menu. | |
Signals inherited from GUI | |
void | tabSelected () |
void | tabDeselected () |
void | stateReceived (int newState) |
void | abortRequested () |
Public Attributes inherited from GUI | |
QString | binary |
QString | title |
QString | server |
int | instance |
Protected Attributes inherited from GUI | |
MainWindow * | mainWindow |
Settings * | settingsBase |
Interface * | interfaceBase |
QSignalMapper * | deviceSignalMapper |
QMenu * | fileMenu |
QMenu * | editMenu |
QMenu * | helpMenu |
QMenu * | deviceSubMenu |
QMenu * | moduleMenu |
QAction * | startAction |
QAction * | stopAction |
QAction * | settingsAct |
QAction * | deviceAct [MAX_GPU_DEVICES] |
QAction * | abortAct |
QAction * | quitAct |
QAction * | aboutAct [2] |
QString | tag |
int | progress |
int | status |
bool | selected |
bool | running |
bool | remoteMode |
bool | useModuleMenu |
bool | moduleConnected |
SOM graphical user interface
SOM::SOM | ( | MainWindow * | pMainWindow, |
QString | binaryName, | ||
QString | moduleTitle, | ||
QString | serverName, | ||
int | instanceID, | ||
int | tabID = -1 |
||
) |
Constructor.
[in] | pMainWindow | - pointer to MainWindow |
[in] | binaryName | - name of module executable |
[in] | moduleTitle | - title of this module |
[in] | server | - server where the module runs |
[in] | instanceID | - module identification number |
[in] | tabID | - module tab index |
SOM::~SOM | ( | ) |
Destructor.
SOM::SOM | ( | Interface * | pInterface | ) |
|
protectedslot |
Shows message box with the information about module.
|
protectedvirtual |
|
protected |
Creates save menu.
int SOM::getDebugMessages | ( | ) |
Returns current debug message level.
int SOM::getDevice | ( | ) |
Returns current GPU device.
float SOM::getHighestDataPoint | ( | ) |
Returns the highest data point found in the training data file.
float SOM::getInitLearningRate | ( | ) |
Returns current initial learning rate.
int SOM::getIterationPause | ( | ) |
Returns current iteration pause value.
float SOM::getLowestDataPoint | ( | ) |
Returns the lowest data point found in the training data file.
string SOM::getMapFile | ( | ) |
Returns the file name used for saving the trained self-organising map.
int SOM::getMaxThreads | ( | ) |
Returns current maximum number of threads per block.
int SOM::getNeighbourhoodSize | ( | ) |
Returns current neighbourhood size.
int SOM::getNumInputs | ( | ) |
Returns current number of inputs.
int SOM::getNumOutputs | ( | ) |
Returns current number of outputs.
int SOM::getNumSamples | ( | ) |
Returns current number of samples.
int SOM::getNumSubiterations | ( | ) |
Returns current number of sub-iterations.
int SOM::getSeed | ( | ) |
Returns current seed.
float SOM::getSigma | ( | ) |
Returns current sigma.
string SOM::getTrainingFile | ( | ) |
Returns the trianing file name.
float SOM::getTrainingTime | ( | ) |
Returns the time it took to train the slef-organising map.
bool SOM::getVisualiseProgress | ( | ) |
Returns current progress visualisation mode.
void SOM::getWeightsAsBottle | ( | Bottle * | bottle | ) |
Loads the bottle with self-organising map's weigths.
[out] | bottle | - weights |
void SOM::loadTrainingSet | ( | Bottle | portData = 0 | ) |
Loads training data.
[in] | portData | - training data sent via port |
void SOM::printGPUProperties | ( | int | deviceID | ) |
Prints properties of a given GPU devices.
[in] | deviceID | - id of a device whose properties are to be printed |
void SOM::printOptions | ( | ) |
Prints options.
vector< string > SOM::queryGPU | ( | ) |
Returns detected GPU devices as a list of their names.
void SOM::randomiseWeights | ( | ) |
Randomises self-organising map's weights.
void SOM::saveMap | ( | ) |
Saves trained self-organising map.
void SOM::setDebugMessages | ( | int | level | ) |
Sets debug message mode.
[in] | level | - debugging level |
void SOM::setDevice | ( | int | deviceID | ) |
Sets current GPU device.
[in] | deviceID | - device id |
void SOM::setGPUMode | ( | bool | gpuMode | ) |
Sets GPU mode.
[in] | gpuMode | - GPU mode (on/off) |
void SOM::setInitLearningRate | ( | float | value | ) |
Sets the initial learning rate used during the training.
[in] | value | - initial learning rate |
void SOM::setIterationPause | ( | int | value | ) |
Sets the iteration pause.
[in] | value | - iteration pause |
void SOM::setMapFile | ( | string | fileName | ) |
Sets the file name used for saving the trained self-organising map.
[in] | fileName | - file name used for saving self-organising map |
void SOM::setMaxThreads | ( | int | value | ) |
Sets maximum number of threads per blocks.
[in] | value | - maximum number of threds |
void SOM::setNeighbourhoodSize | ( | int | value | ) |
Sets self-organising map's neighbourhood size.
[in] | value | - neighbourhood size |
void SOM::setNumInputs | ( | int | value | ) |
Sets the number of inputs of self-organising map.
[in] | value | - number of inputs |
void SOM::setNumIterations | ( | int | value | ) |
Sets the number of iterations used during the training.
[in] | value | - number of iterations |
void SOM::setNumOutputs | ( | int | value | ) |
Sets the number of outputs of self-organising map.
[in] | value | - number of outputs |
void SOM::setNumSamples | ( | int | value | ) |
Sets the total number of samples present in the training data.
[in] | value | - number of samples |
void SOM::setNumSubiterations | ( | int | value | ) |
Sets the number of sub-iterations used during the training.
[in] | value | - number of sub-iterations |
void SOM::setSeed | ( | int | value | ) |
Sets seed for random number generation.
[in] | value | - seed value |
void SOM::setSigma | ( | float | value | ) |
Sets the sigma value used during the training.
[in] | value | - sigma |
void SOM::setTrainingFile | ( | string | fileName | ) |
Sets the file name containing the training data.
[in] | fileName | - training file name |
void SOM::setVisualiseProgress | ( | bool | visualise | ) |
Sets the progress visualisation on/off.
[in] | visualise | - progress visualisation (on/off) |
|
protectedslot |
Updates graphical user interface.