MachineIntelligenceCore:Toolchain
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mic::application::TrainThenTestApplication Class Referenceabstract

Parent class for all applications consisting 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 <TrainThenTestApplication.hpp>

Inheritance diagram for mic::application::TrainThenTestApplication:
Collaboration diagram for mic::application::TrainThenTestApplication:

Public Member Functions

 TrainThenTestApplication (std::string node_name_)
 
virtual ~TrainThenTestApplication ()
 
void run ()
 
- Public Member Functions inherited from mic::application::Application
 Application (std::string node_name_)
 
virtual ~Application ()
 
virtual void initialize (int argc, char *argv[])=0
 
virtual void displayStatus ()
 
- Public Member Functions inherited from mic::configuration::PropertyTree
 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 ()
 
PropertyInterfacegetProperty (const std::string &name)
 
virtual void initializePropertyDependentVariables ()=0
 

Protected Member Functions

virtual bool performSingleStep ()
 
virtual bool performLearningStep ()=0
 
virtual bool performTestingStep ()=0
 

Additional Inherited Members

- Protected Attributes inherited from mic::application::Application
unsigned long iteration
 Iteration counter. More...
 
mic::configuration::Property
< long > 
number_of_iterations
 

Detailed Description

Parent class for all applications consisting 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.

Author
tkornuta
Date
Feb 17, 2016

Definition at line 39 of file TrainThenTestApplication.hpp.

Constructor & Destructor Documentation

mic::application::TrainThenTestApplication::TrainThenTestApplication ( std::string  node_name_)

Default constructor. Sets the application/node name and registers properties.

Parameters
node_name_Name of the application/node (in configuration file).

Definition at line 29 of file TrainThenTestApplication.cpp.

References APP_STATE.

virtual mic::application::TrainThenTestApplication::~TrainThenTestApplication ( )
inlinevirtual

Default destructor - empty.

Definition at line 50 of file TrainThenTestApplication.hpp.

Member Function Documentation

virtual bool mic::application::TrainThenTestApplication::performLearningStep ( )
protectedpure virtual

Perform learning step - abstract, to be overridden.

Returns
Returns false when test learning is completed.

Referenced by performSingleStep().

bool mic::application::TrainThenTestApplication::performSingleStep ( void  )
protectedvirtual

Performs single step of computations. Depending on the state, calls learning or testing step - switches from learning to testing then learning return false.

Implements mic::application::Application.

Definition at line 66 of file TrainThenTestApplication.cpp.

References APP_STATE, performLearningStep(), and performTestingStep().

Referenced by run().

Here is the call graph for this function:

virtual bool mic::application::TrainThenTestApplication::performTestingStep ( )
protectedpure virtual

Perform testing step - abstract, to be overridden.

Returns
Returns false when test learning is completed.

Referenced by performSingleStep().

void mic::application::TrainThenTestApplication::run ( )
virtual

Main application method - runs consecutive steps, first learning (in several steps, until performLearningStep() will return false) then testing (until performTestingStep() will return false, then finish).

Reimplemented from mic::application::Application.

Definition at line 36 of file TrainThenTestApplication.cpp.

References APP_DATA_SYNCHRONIZATION_SCOPED_LOCK, APP_SLEEP, APP_STATE, mic::application::Application::iteration, and performSingleStep().

Here is the call graph for this function:


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