MachineIntelligenceCore:Toolchain
|
Parent class for all applications basing on episodes. Each episode consists of two phases: a training phase (first), and testing phase (second). Each phase will end when then an adequate method (performLearning/TrainingStep) will return false. By default all computations are made within a single thread. More...
#include <EpisodicTrainAndTestApplication.hpp>
Public Member Functions | |
EpisodicTrainAndTestApplication (std::string node_name_) | |
virtual | ~EpisodicTrainAndTestApplication () |
void | run () |
![]() | |
Application (std::string node_name_) | |
virtual | ~Application () |
virtual void | initialize (int argc, char *argv[])=0 |
virtual void | displayStatus () |
![]() | |
PropertyTree (std::string node_name_) | |
virtual | ~PropertyTree () |
void | registerProperty (PropertyInterface &prop) |
std::string | getNodeName () const |
void | loadPropertiesFromConfigNode (boost::property_tree::ptree const &pt_) |
void | printProperties () |
void | printPropertiesWithValues () |
PropertyInterface * | getProperty (const std::string &name) |
virtual void | initializePropertyDependentVariables ()=0 |
Protected Member Functions | |
virtual bool | performSingleStep () |
virtual bool | performLearningStep ()=0 |
virtual bool | performTestingStep ()=0 |
virtual void | startNewEpisode ()=0 |
virtual void | finishCurrentEpisode ()=0 |
Protected Attributes | |
unsigned long | episode |
Episode counter. More... | |
unsigned long | learning_iteration |
Learning iteration counter. More... | |
mic::configuration::Property < unsigned long > | number_of_episodes |
![]() | |
unsigned long | iteration |
Iteration counter. More... | |
mic::configuration::Property < long > | number_of_iterations |
Parent class for all applications basing on episodes. Each episode consists of two phases: a training phase (first), and testing phase (second). Each phase will end when then an adequate method (performLearning/TrainingStep) will return false. By default all computations are made within a single thread.
Definition at line 39 of file EpisodicTrainAndTestApplication.hpp.
mic::application::EpisodicTrainAndTestApplication::EpisodicTrainAndTestApplication | ( | std::string | node_name_ | ) |
Default constructor. Sets the application/node name and registers properties.
node_name_ | Name of the application/node (in configuration file). |
Definition at line 29 of file EpisodicTrainAndTestApplication.cpp.
References APP_STATE, number_of_episodes, and mic::configuration::PropertyTree::registerProperty().
|
inlinevirtual |
Default destructor - empty.
Definition at line 50 of file EpisodicTrainAndTestApplication.hpp.
|
protectedpure virtual |
Method called when given episode ends (goal: export collected statistics to file etc.) - abstract, to be overridden.
Referenced by performSingleStep().
|
protectedpure virtual |
Perform learning step - abstract, to be overridden.
Referenced by performSingleStep().
|
protectedvirtual |
Performs single step of computations. Depending on the state, calls learning or testing step - switches from learning to testing then learning return false - everything in the scope of a given episode.
Implements mic::application::Application.
Definition at line 75 of file EpisodicTrainAndTestApplication.cpp.
References APP_STATE, episode, finishCurrentEpisode(), number_of_episodes, performLearningStep(), performTestingStep(), and startNewEpisode().
Referenced by run().
|
protectedpure virtual |
Perform testing step - abstract, to be overridden.
Referenced by performSingleStep().
|
virtual |
Main application method - handles single step/pause/quite modes/commands. Calls performSingleStep().
Reimplemented from mic::application::Application.
Definition at line 42 of file EpisodicTrainAndTestApplication.cpp.
References APP_DATA_SYNCHRONIZATION_SCOPED_LOCK, APP_SLEEP, APP_STATE, mic::application::Application::iteration, performSingleStep(), and startNewEpisode().
|
protectedpure virtual |
Method called at the beginning of new episode (goal: to reset the statistics etc.) - abstract, to be overridden.
Referenced by performSingleStep(), and run().
|
protected |
Episode counter.
Definition at line 87 of file EpisodicTrainAndTestApplication.hpp.
Referenced by performSingleStep().
|
protected |
Learning iteration counter.
Definition at line 90 of file EpisodicTrainAndTestApplication.hpp.
|
protected |
Property: number of episodes, after which the application will end. 0 (default value) deactivates terminal condition (unlimited number of episodes).
Definition at line 95 of file EpisodicTrainAndTestApplication.hpp.
Referenced by EpisodicTrainAndTestApplication(), and performSingleStep().