14 #ifndef __RANDOMSEARCH_H__
15 #define __RANDOMSEARCH_H__
30 #include "performance_functional.h"
32 #include "training_algorithm.h"
36 #include "../tinyxml2/tinyxml2.h"
274 tinyxml2::XMLDocument*
to_XML(
void)
const;
275 void from_XML(
const tinyxml2::XMLDocument&);
void set_error_parameters_norm(const double &)
void set_error_training_rate(const double &)
double maximum_time
Maximum training time. It is used as a stopping criterion.
virtual ~RandomSearchResults(void)
Destructor.
void resize_training_history(const size_t &)
void set_training_rate_reduction_factor(const double &)
void set_first_training_rate(const double &)
bool reserve_generalization_performance_history
True if the Generalization performance history vector is to be reserved, false otherwise.
size_t maximum_generalization_performance_decreases
void set_display_period(const size_t &)
const bool & get_reserve_parameters_norm_history(void) const
Returns true if the parameters norm history vector is to be reserved, and false otherwise.
RandomSearch * random_search_pointer
Pointer to the random search object for which the training results are to be stored.
bool reserve_training_rate_history
True if the training rate history vector is to be reserved, false otherwise.
const double & get_error_parameters_norm(void) const
Vector< double > parameters_norm_history
History of the parameters norm over the training iterations.
Vector< Vector< double > > parameters_history
History of the neural network parameters over the training iterations.
RandomSearchResults(RandomSearch *new_random_search_pointer)
Random search constructor.
std::string write_training_algorithm_type(void) const
This method writes a string with the type of training algoritm.
size_t maximum_iterations_number
Maximum number of iterations to perform_training. It is used as a stopping criterion.
Vector< double > generalization_performance_history
History of the generalization performance over the training iterations.
virtual void set_reserve_all_training_history(const bool &)
Makes the training history of all variables to be reseved or not in memory.
double final_parameters_norm
Final neural network parameters norm.
void set_training_rate_reduction_period(const size_t &)
bool reserve_training_direction_history
True if the training direction history matrix is to be reserved, false otherwise. ...
void set_reserve_parameters_norm_history(const bool &)
const double & get_maximum_time(void) const
Returns the maximum training time.
const double & get_warning_parameters_norm(void) const
Returns the minimum value for the norm of the parameters vector at wich a warning message is written ...
void set_reserve_elapsed_time_history(const bool &)
bool reserve_performance_history
True if the performance history vector is to be reserved, false otherwise.
Vector< Vector< double > > training_direction_history
History of the random search training direction over the training iterations.
void set_maximum_iterations_number(const size_t &)
void set_maximum_generalization_performance_decreases(const size_t &)
double final_training_rate
Final random search training rate.
Vector< double > performance_history
History of the performance function performance over the training iterations.
bool reserve_parameters_history
True if the parameters history vector of vectors is to be reserved, false otherwise.
const size_t & get_training_rate_reduction_period(void) const
Returns the reducing period for the training rate.
void set_reserve_training_rate_history(const bool &)
void from_XML(const tinyxml2::XMLDocument &)
const size_t & get_maximum_iterations_number(void) const
Returns the maximum number of iterations for training.
const double & get_performance_goal(void) const
const bool & get_reserve_performance_history(void) const
Returns true if the performance history vector is to be reserved, and false otherwise.
void set_warning_parameters_norm(const double &)
double warning_parameters_norm
Value for the parameters norm at which a warning message is written to the screen.
Vector< double > training_direction_norm_history
History of the norm of the training direction over the training iterations.
Vector< double > elapsed_time_history
History of the elapsed time over the training iterations.
size_t iterations_number
Maximum number of training iterations.
const double & get_training_rate_reduction_factor(void) const
Returns the reducing factor for the training rate.
const bool & get_reserve_training_rate_history(void) const
Returns true if the training rate history vector is to be reserved, and false otherwise.
std::string to_string(void) const
Returns a string representation of the current random search results structure.
double warning_training_rate
Training rate value at wich a warning message is written to the screen.
Vector< double > final_parameters
Final neural network parameters vector.
RandomSearchResults(void)
Default constructor.
double training_rate_reduction_factor
bool reserve_elapsed_time_history
True if the elapsed time history vector is to be reserved, false otherwise.
const bool & get_reserve_parameters_history(void) const
Returns true if the parameters history matrix is to be reserved, and false otherwise.
double final_generalization_performance
Final generalization performance.
RandomSearchResults * perform_training(void)
void set_reserve_parameters_history(const bool &)
const double & get_warning_training_rate(void) const
Returns the training rate value at wich a warning message is written to the screen during line minimi...
void set_warning_training_rate(const double &)
double final_performance
Final performance function evaluation.
const bool & get_reserve_training_direction_history(void) const
Returns true if the training direction history matrix is to be reserved, and false otherwise...
virtual ~RandomSearch(void)
const double & get_error_training_rate(void) const
const bool & get_reserve_generalization_performance_history(void) const
Returns true if the Generalization performance history vector is to be reserved, and false otherwise...
void set_reserve_performance_history(const bool &)
const size_t & get_maximum_generalization_performance_decreases(void) const
Returns the maximum number of generalization failures during the training process.
Matrix< std::string > to_string_matrix(void) const
size_t training_rate_reduction_period
Iterations interval at which the training rate is reduced.
double first_training_rate
Initial training rate following a random training direction.
Vector< double > training_rate_history
History of the random search training rate over the training iterations.
void set_reserve_training_direction_history(const bool &)
const bool & get_reserve_elapsed_time_history(void) const
Returns true if the elapsed time history vector is to be reserved, and false otherwise.
double error_parameters_norm
Value for the parameters norm at which the training process is assumed to fail.
void set_reserve_generalization_performance_history(const bool &)
Vector< double > final_training_direction
Final random search training direction.
bool reserve_parameters_norm_history
True if the parameters norm history vector is to be reserved, false otherwise.
bool reserve_training_direction_norm_history
True if the training direction norm history vector is to be reserved, false otherwise.
double elapsed_time
Elapsed time of the training process.
double performance_goal
Goal value for the performance. It is used as a stopping criterion.
Vector< double > calculate_training_direction(void) const
Calculates a random vector to be used as training direction.
void set_reserve_training_direction_norm_history(const bool &)
void set_maximum_time(const double &)
Matrix< std::string > write_final_results(const size_t &precision=3) const
Returns a default (empty) string matrix with the final results from training.
void set_performance_goal(const double &)
double error_training_rate
Training rate at wich the line minimization algorithm is assumed to be unable to bracket a minimum...
tinyxml2::XMLDocument * to_XML(void) const