#include <random_search.h>
Definition at line 36 of file random_search.h.
OpenNN::RandomSearch::RandomSearch | ( | void | ) | [explicit] |
Default constructor. It creates a random search training algorithm not associated to any performance functional object. It also initializes the class members to their default values.
Definition at line 40 of file random_search.cpp.
OpenNN::RandomSearch::RandomSearch | ( | PerformanceFunctional * | new_performance_functional_pointer | ) | [explicit] |
Performance functional constructor. It creates a random search training algorithm associated to a performance functional object. It also initializes the class members to their default values.
new_performance_functional_pointer | Pointer to a performance functional object. |
Definition at line 54 of file random_search.cpp.
OpenNN::RandomSearch::RandomSearch | ( | TiXmlElement * | random_search_element | ) | [explicit] |
XML constructor. It creates a random search training algorithm not associated to any performance functional object. It also loads the rest of class members from a XML element.
random_search_element | TinyXML element containing the members of a random search object. |
Definition at line 68 of file random_search.cpp.
OpenNN::RandomSearch::~RandomSearch | ( | void | ) | [virtual] |
Destructor. It does not delete any object.
Definition at line 79 of file random_search.cpp.
const double & OpenNN::RandomSearch::get_training_rate_reduction_factor | ( | void | ) | const |
This method returns the reducing factor for the training rate.
Definition at line 272 of file random_search.cpp.
const unsigned int & OpenNN::RandomSearch::get_training_rate_reduction_period | ( | void | ) | const |
This method returns the reducing period for the training rate.
Definition at line 282 of file random_search.cpp.
const bool & OpenNN::RandomSearch::get_reserve_parameters_history | ( | void | ) | const |
This method returns true if the parameters history matrix is to be reserved, and false otherwise.
Definition at line 192 of file random_search.cpp.
const bool & OpenNN::RandomSearch::get_reserve_parameters_norm_history | ( | void | ) | const |
This method returns true if the parameters norm history vector is to be reserved, and false otherwise.
Definition at line 202 of file random_search.cpp.
const bool & OpenNN::RandomSearch::get_reserve_evaluation_history | ( | void | ) | const |
This method returns true if the evaluation history vector is to be reserved, and false otherwise.
Definition at line 212 of file random_search.cpp.
const double & OpenNN::RandomSearch::get_warning_parameters_norm | ( | void | ) | const |
This method returns the minimum value for the norm of the parameters vector at wich a warning message is written to the screen.
Definition at line 89 of file random_search.cpp.
const double & OpenNN::RandomSearch::get_warning_training_rate | ( | void | ) | const |
This method returns the training rate value at wich a warning message is written to the screen during line minimization.
Definition at line 99 of file random_search.cpp.
const double & OpenNN::RandomSearch::get_error_parameters_norm | ( | void | ) | const |
This method returns the value for the norm of the parameters vector at wich an error message is written to the screen and the program exits.
Definition at line 110 of file random_search.cpp.
const double & OpenNN::RandomSearch::get_error_training_rate | ( | void | ) | const |
This method returns the training rate value at wich the line minimization algorithm is assumed to fail when bracketing a minimum.
Definition at line 121 of file random_search.cpp.
const double & OpenNN::RandomSearch::get_minimum_parameters_increment_norm | ( | void | ) | const |
This method returns the minimum norm of the parameter increment vector used as a stopping criteria when training.
Definition at line 131 of file random_search.cpp.
const double & OpenNN::RandomSearch::get_minimum_performance_increase | ( | void | ) | const |
This method returns the minimum performance improvement during training.
Definition at line 141 of file random_search.cpp.
const double & OpenNN::RandomSearch::get_performance_goal | ( | void | ) | const |
This method returns the goal value for the performance. This is used as a stopping criterium when training a multilayer perceptron
Definition at line 152 of file random_search.cpp.
const unsigned int & OpenNN::RandomSearch::get_maximum_generalization_evaluation_decreases | ( | void | ) | const |
This method returns the maximum number of generalization failures during the training process.
Definition at line 162 of file random_search.cpp.
const unsigned int & OpenNN::RandomSearch::get_maximum_epochs_number | ( | void | ) | const |
This method returns the maximum number of epochs for training.
Definition at line 172 of file random_search.cpp.
const double & OpenNN::RandomSearch::get_maximum_time | ( | void | ) | const |
const bool & OpenNN::RandomSearch::get_reserve_generalization_evaluation_history | ( | void | ) | const |
This method returns true if the Generalization evaluation history vector is to be reserved, and false otherwise.
Definition at line 252 of file random_search.cpp.
const bool & OpenNN::RandomSearch::get_reserve_training_direction_history | ( | void | ) | const |
This method returns true if the training direction history matrix is to be reserved, and false otherwise.
Definition at line 222 of file random_search.cpp.
const bool & OpenNN::RandomSearch::get_reserve_training_rate_history | ( | void | ) | const |
This method returns true if the training rate history vector is to be reserved, and false otherwise.
Definition at line 232 of file random_search.cpp.
const bool & OpenNN::RandomSearch::get_reserve_elapsed_time_history | ( | void | ) | const |
This method returns true if the elapsed time history vector is to be reserved, and false otherwise.
Definition at line 242 of file random_search.cpp.
const unsigned int & OpenNN::RandomSearch::get_display_period | ( | void | ) | const |
This method returns the number of epochs between the training showing progress.
Definition at line 262 of file random_search.cpp.
void OpenNN::RandomSearch::set_default | ( | void | ) | [virtual] |
This method sets all the random search object members to their default values:
Reimplemented from OpenNN::TrainingAlgorithm.
Definition at line 306 of file random_search.cpp.
void OpenNN::RandomSearch::set_training_rate_reduction_factor | ( | const double & | new_training_rate_reduction_factor | ) |
This method sets a new value for the reduction factor of the training rate.
new_training_rate_reduction_factor | Reduction factor value. |
Definition at line 346 of file random_search.cpp.
void OpenNN::RandomSearch::set_training_rate_reduction_period | ( | const unsigned int & | new_training_rate_reduction_period | ) |
This method sets a new period value for the reduction of the training rate. This is measured in training epochs.
new_training_rate_reduction_period | Reduction period for the training rate. |
Definition at line 357 of file random_search.cpp.
void OpenNN::RandomSearch::set_reserve_parameters_history | ( | const bool & | new_reserve_parameters_history | ) |
This method makes the potential parameters history vector of vectors to be reseved or not in memory.
new_reserve_parameters_history | True if the potential parameters history is to be reserved, false otherwise. |
Definition at line 368 of file random_search.cpp.
void OpenNN::RandomSearch::set_reserve_parameters_norm_history | ( | const bool & | new_reserve_parameters_norm_history | ) |
This method makes the potential parameters norm history vector to be reseved or not in memory.
new_reserve_parameters_norm_history | True if the potential parameters norm history is to be reserved, false otherwise. |
Definition at line 380 of file random_search.cpp.
void OpenNN::RandomSearch::set_reserve_evaluation_history | ( | const bool & | new_reserve_evaluation_history | ) |
This method makes the potential evaluation history vector to be reseved or not in memory.
new_reserve_evaluation_history | True if the potential evaluation history is to be reserved, false otherwise. |
Definition at line 392 of file random_search.cpp.
void OpenNN::RandomSearch::set_warning_parameters_norm | ( | const double & | new_warning_parameters_norm | ) |
This method sets a new value for the parameters vector norm at which a warning message is written to the screen.
new_warning_parameters_norm | Warning norm of parameters vector value. |
Definition at line 428 of file random_search.cpp.
void OpenNN::RandomSearch::set_warning_training_rate | ( | const double & | new_warning_training_rate | ) |
This method sets a new training rate value at wich a warning message is written to the screen during line minimization.
new_warning_training_rate | Warning training rate value. |
Definition at line 460 of file random_search.cpp.
void OpenNN::RandomSearch::set_error_parameters_norm | ( | const double & | new_error_parameters_norm | ) |
This method sets a new value for the parameters vector norm at which an error message is written to the screen and the program exits.
new_error_parameters_norm | Error norm of parameters vector value. |
Definition at line 489 of file random_search.cpp.
void OpenNN::RandomSearch::set_error_training_rate | ( | const double & | new_error_training_rate | ) |
This method sets a new training rate value at wich a the line minimization algorithm is assumed to fail when bracketing a minimum.
new_error_training_rate | Error training rate value. |
Definition at line 520 of file random_search.cpp.
void OpenNN::RandomSearch::set_minimum_parameters_increment_norm | ( | const double & | new_minimum_parameters_increment_norm | ) |
This method sets a new value for the minimum parameters increment norm stopping criterium.
new_minimum_parameters_increment_norm | Value of norm of parameters increment norm used to stop training. |
Definition at line 550 of file random_search.cpp.
void OpenNN::RandomSearch::set_minimum_performance_increase | ( | const double & | new_minimum_performance_increase | ) |
This method sets a new minimum performance improvement during training.
new_minimum_performance_increase | Minimum improvement in the performance between two epochs. |
Definition at line 580 of file random_search.cpp.
void OpenNN::RandomSearch::set_performance_goal | ( | const double & | new_performance_goal | ) |
This method sets a new goal value for the performance. This is used as a stopping criterium when training a multilayer perceptron
new_performance_goal | Goal value for the performance. |
Definition at line 611 of file random_search.cpp.
void OpenNN::RandomSearch::set_maximum_generalization_evaluation_decreases | ( | const unsigned int & | new_maximum_generalization_evaluation_decreases | ) |
This method sets a new maximum number of generalization failures.
new_maximum_generalization_evaluation_decreases | Maximum number of epochs in which the generalization evalutation decreases. |
Definition at line 622 of file random_search.cpp.
void OpenNN::RandomSearch::set_maximum_epochs_number | ( | const unsigned int & | new_maximum_epochs_number | ) |
This method sets a maximum number of epochs for training.
new_maximum_epochs_number | Maximum number of epochs for training. |
Definition at line 652 of file random_search.cpp.
void OpenNN::RandomSearch::set_maximum_time | ( | const double & | new_maximum_time | ) |
This method sets a new maximum training time.
new_maximum_time | Maximum training time. |
Definition at line 682 of file random_search.cpp.
void OpenNN::RandomSearch::set_reserve_generalization_evaluation_history | ( | const bool & | new_reserve_generalization_evaluation_history | ) |
This method makes the Generalization evaluation history to be reserved or not in memory. This is a vector.
new_reserve_generalization_evaluation_history | True if the Generalization evaluation history is to be reserved, false otherwise. |
Definition at line 749 of file random_search.cpp.
void OpenNN::RandomSearch::set_reserve_training_direction_history | ( | const bool & | new_reserve_training_direction_history | ) |
This method makes the training direction history vector of vectors to be reseved or not in memory.
new_reserve_training_direction_history | True if the training direction history matrix is to be reserved, false otherwise. |
Definition at line 713 of file random_search.cpp.
void OpenNN::RandomSearch::set_reserve_training_rate_history | ( | const bool & | new_reserve_training_rate_history | ) |
This method makes the training rate history vector to be reseved or not in memory.
new_reserve_training_rate_history | True if the training rate history vector is to be reserved, false otherwise. |
Definition at line 725 of file random_search.cpp.
void OpenNN::RandomSearch::set_reserve_elapsed_time_history | ( | const bool & | new_reserve_elapsed_time_history | ) |
This method makes the elapsed time over the epochs to be reseved or not in memory. This is a vector.
new_reserve_elapsed_time_history | True if the elapsed time history vector is to be reserved, false otherwise. |
Definition at line 737 of file random_search.cpp.
void OpenNN::RandomSearch::set_reserve_all_training_history | ( | const bool & | new_reserve_all_training_history | ) | [virtual] |
This method makes the training history of all variables to be reseved or not in memory.
This method makes the training history of all variables to reseved or not in memory.
new_reserve_all_training_history | True if the training history of all variables is to be reserved, false otherwise. |
Definition at line 404 of file random_search.cpp.
void OpenNN::RandomSearch::set_display_period | ( | const unsigned int & | new_display_period | ) |
This method sets a new number of epochs between the training showing progress.
new_display_period | Number of epochs between the training showing progress. |
Definition at line 761 of file random_search.cpp.
Vector< double > OpenNN::RandomSearch::calculate_training_direction | ( | void | ) |
This method calculates a random vector to be used as training direction.
Definition at line 789 of file random_search.cpp.
RandomSearch::RandomSearchResults * OpenNN::RandomSearch::perform_training | ( | void | ) | [virtual] |
This method trains a neural network with an associated performance functional according to the random search training algorithm. Training occurs according to the training parameters.
Implements OpenNN::TrainingAlgorithm.
Definition at line 906 of file random_search.cpp.
std::string OpenNN::RandomSearch::write_training_algorithm_type | ( | void | ) | const [virtual] |
This method writes a string with the type of training algoritm.
Reimplemented from OpenNN::TrainingAlgorithm.
Definition at line 1155 of file random_search.cpp.
TiXmlElement * OpenNN::RandomSearch::to_XML | ( | void | ) | const [virtual] |
This method prints to the screen the training parameters, the stopping criteria and other user stuff concerning the random search object.
Reimplemented from OpenNN::TrainingAlgorithm.
Definition at line 1166 of file random_search.cpp.
void OpenNN::RandomSearch::from_XML | ( | TiXmlElement * | training_algorithm_element | ) | [virtual] |
This method loads a training algorithm object from a XML element.
training_algorithm_element | Pointer to a Tiny XML element containing the training algorithm members. |
Reimplemented from OpenNN::TrainingAlgorithm.
Definition at line 1390 of file random_search.cpp.