14 #ifndef __TRAININGALGORITHM_H__
15 #define __TRAININGALGORITHM_H__
29 #include "performance_functional.h"
33 #include "../tinyxml2/tinyxml2.h"
104 return(final_results);
144 virtual void check(
void)
const;
154 virtual std::string
to_string(
void)
const;
155 void print(
void)
const;
159 virtual tinyxml2::XMLDocument*
to_XML(
void)
const;
160 virtual void from_XML(
const tinyxml2::XMLDocument&);
162 void save(
const std::string&)
const;
163 void load(
const std::string&);
virtual Matrix< std::string > write_final_results(const size_t &) const
Returns a default (empty) string matrix with the final results from training.
void set_display_period(const size_t &)
virtual void set_default(void)
Sets the members of the training algorithm object to their default values.
void save(const std::string &) const
const size_t & get_save_period(void) const
Returns the number of iterations between the training saving progress.
bool display
Display messages to screen.
PerformanceFunctional * get_performance_functional_pointer(void) const
bool has_performance_functional(void) const
void print(void) const
Prints to the screen the XML-type representation of the training algorithm object.
void set_save_period(const size_t &)
size_t save_period
Number of iterations between the training saving progress.
virtual tinyxml2::XMLDocument * to_XML(void) const
virtual TrainingAlgorithmResults * perform_training(void)=0
Trains a neural network which has a performance functional associated.
void set_display(const bool &)
std::string neural_network_file_name
Path where the neural network is saved.
void set_neural_network_file_name(const std::string &)
virtual std::string write_training_algorithm_type(void) const
This method writes a string with the type of training algoritm.
virtual Matrix< std::string > to_string_matrix(void) const
virtual TrainingAlgorithm & operator=(const TrainingAlgorithm &)
virtual bool operator==(const TrainingAlgorithm &) const
virtual std::string to_string(void) const
Returns a string representation of the results structure.
virtual void check(void) const
virtual std::string to_string(void) const
Returns a default string representation of a training algorithm.
const bool & get_display(void) const
virtual void initialize_random(void)
const size_t & get_display_period(void) const
Returns the number of iterations between the training showing progress.
virtual void from_XML(const tinyxml2::XMLDocument &)
PerformanceFunctional * performance_functional_pointer
Pointer to a performance functional for a multilayer perceptron object.
virtual void set_performance_functional_pointer(PerformanceFunctional *)
virtual ~TrainingAlgorithm(void)
Destructor.
size_t display_period
Number of iterations between the training showing progress.
void load(const std::string &)
const std::string & get_neural_network_file_name(void) const
Returns the file name where the neural network will be saved.