14 #ifndef __TRAININGSTRATEGY_H__
15 #define __TRAININGSTRATEGY_H__
29 #include "performance_functional.h"
31 #include "training_algorithm.h"
33 #include "random_search.h"
34 #include "evolutionary_algorithm.h"
36 #include "gradient_descent.h"
37 #include "conjugate_gradient.h"
38 #include "quasi_newton_method.h"
39 #include "levenberg_marquardt_algorithm.h"
41 #include "newton_method.h"
45 #include "../tinyxml2/tinyxml2.h"
91 EVOLUTIONARY_ALGORITHM,
103 LEVENBERG_MARQUARDT_ALGORITHM,
132 void save(
const std::string&)
const;
239 void print(
void)
const;
241 tinyxml2::XMLDocument*
to_XML(
void)
const;
242 void from_XML(
const tinyxml2::XMLDocument&);
244 void save(
const std::string&)
const;
245 void load(
const std::string&);
std::string write_main_type_text(void) const
Returns a string with the main type in text format.
void destruct_main(void)
This method deletes the main training algorithm object which composes this training strategy object...
GradientDescent::GradientDescentResults * gradient_descent_results_pointer
Pointer to a structure with the results from the gradient descent training algorithm.
std::string write_refinement_type_text(void) const
Returns a string with the refinement type in text format.
PerformanceFunctional * get_performance_functional_pointer(void) const
Returns a pointer to the performance functional object to which the training strategy is associated...
void set_display(const bool &)
void from_XML(const tinyxml2::XMLDocument &)
void load(const std::string &)
virtual ~Results(void)
Destructor.
QuasiNewtonMethod * quasi_Newton_method_pointer
Pointer to a quasi-Newton method object to be used as a main training algorithm.
EvolutionaryAlgorithm * evolutionary_algorithm_pointer
Pointer to a evolutionary training object to be used for initialization in the training strategy...
void print(void) const
Prints to the screen the string representation of the training strategy object.
InitializationType initialization_type
Type of initialization training algorithm.
bool has_performance_functional(void) const
NewtonMethod * get_Newton_method_pointer(void) const
RandomSearch * get_random_search_pointer(void) const
void set_refinement_type(const RefinementType &)
const RefinementType & get_refinement_type(void) const
Returns the type of the refinement training algorithm composing this training strategy object...
void check_training_algorithms(void) const
QuasiNewtonMethod * get_quasi_Newton_method_pointer(void) const
LevenbergMarquardtAlgorithm::LevenbergMarquardtAlgorithmResults * Levenberg_Marquardt_algorithm_results_pointer
Pointer to a structure with the results from the Levenberg-Marquardt training algorithm.
NewtonMethod::NewtonMethodResults * Newton_method_results_pointer
Pointer to a structure with results from the Newton method training algorithm.
void save(const std::string &) const
void set_performance_functional_pointer(PerformanceFunctional *)
ConjugateGradient::ConjugateGradientResults * conjugate_gradient_results_pointer
Pointer to a structure with the results from the conjugate gradient training algorithm.
NewtonMethod * Newton_method_pointer
Pointer to a Newton method object to be used for refinement in the training strategy.
virtual ~TrainingStrategy(void)
std::string to_string(void) const
Returns a string representation of the training strategy.
std::string write_initialization_type(void) const
Returns a string with the type of the initialization training algorithm composing this training strat...
GradientDescent * gradient_descent_pointer
Pointer to a gradient descent object to be used as a main training algorithm.
std::string write_refinement_type(void) const
Returns a string with the type of the refinement training algorithm composing this training strategy ...
PerformanceFunctional * performance_functional_pointer
Pointer to an external performance functional object.
LevenbergMarquardtAlgorithm * get_Levenberg_Marquardt_algorithm_pointer(void) const
EvolutionaryAlgorithm::EvolutionaryAlgorithmResults * evolutionary_algorithm_results_pointer
Pointer to a structure with the results from the evolutionary training algorithm. ...
void save(const std::string &) const
ConjugateGradient * get_conjugate_gradient_pointer(void) const
void set_initialization_type(const InitializationType &)
RefinementType refinement_type
Type of refinement training algorithm.
bool display
Display messages to screen.
QuasiNewtonMethod::QuasiNewtonMethodResults * quasi_Newton_method_results_pointer
Pointer to a structure with the results from the quasi-Newton method training algorithm.
void initialize_random(void)
std::string write_initialization_type_text(void) const
Returns a string with the initialization type in text format.
Results perform_training(void)
void set_main_type(const MainType &)
void destruct_initialization(void)
This method deletes the initialization training algorithm object which composes this training strateg...
const MainType & get_main_type(void) const
Returns the type of the main training algorithm composing this training strategy object.
virtual void set_default(void)
void destruct_refinement(void)
This method deletes the refinement training algorithm object which composes this training strategy ob...
Results(void)
Default constructor.
MainType
Enumeration of all the available types of training algorithms.
void check_performance_functional(void) const
Throws an exception if the training strategy has not a performance functional associated.
ConjugateGradient * conjugate_gradient_pointer
Pointer to a conjugate gradient object to be used as a main training algorithm.
GradientDescent * get_gradient_descent_pointer(void) const
RefinementType
Enumeration of all the available types of training algorithms.
RandomSearch * random_search_pointer
Pointer to a random search object to be used for initialization in the training strategy.
const bool & get_display(void) const
tinyxml2::XMLDocument * to_XML(void) const
EvolutionaryAlgorithm * get_evolutionary_algorithm_pointer(void) const
const InitializationType & get_initialization_type(void) const
Returns the type of the initialization training algorithm composing this training strategy object...
LevenbergMarquardtAlgorithm * Levenberg_Marquardt_algorithm_pointer
Pointer to a Levenberg-Marquardt algorithm object to be used as a main training algorithm.
InitializationType
Enumeration of all the available types of training algorithms.
MainType main_type
Type of main training algorithm.
RandomSearch::RandomSearchResults * random_search_results_pointer
Pointer to a structure with the results from the random search training algorithm.
std::string write_main_type(void) const
Returns a string with the type of the main training algorithm composing this training strategy object...