#include <TrainingAlgorithm.h>
Definition at line 31 of file TrainingAlgorithm.h.
Available training operators for obtaining the train rate.
Definition at line 40 of file TrainingAlgorithm.h.
Flood::TrainingAlgorithm::TrainingAlgorithm | ( | ObjectiveFunctional * | new_objective_functional_pointer | ) | [explicit] |
General constructor. It creates a training algorithm object associated to an objective functional object.
new_objective_functional_pointer | Pointer to an objective functional object. |
Definition at line 34 of file TrainingAlgorithm.cpp.
Flood::TrainingAlgorithm::TrainingAlgorithm | ( | void | ) | [explicit] |
Default constructor. It creates a training algorithm object not associated to any objective functional object.
Definition at line 46 of file TrainingAlgorithm.cpp.
Flood::TrainingAlgorithm::~TrainingAlgorithm | ( | void | ) | [virtual] |
Vector< double > Flood::TrainingAlgorithm::calculate_bracketing_training_rate_evaluation | ( | double | evaluation, | |
const Vector< double > & | training_direction, | |||
double | initial_training_rate | |||
) |
This method returns a vector with two elements, a bracketing training rate for the optimum, and the evaluation for that training rate. This algorithm is used by line minimization algorithms.
evaluation | Initial objective function evaluation. | |
training_direction | Initial training direction. | |
initial_training_rate | Initial training rate to start the algorithm. |
Definition at line 1416 of file TrainingAlgorithm.cpp.
Vector< double > Flood::TrainingAlgorithm::calculate_Brent_method_training_rate_evaluation | ( | double | evaluation, | |
const Vector< double > & | training_direction, | |||
double | initial_training_rate | |||
) |
This method returns the training rate by searching in a given direction to locate the minimum of the evaluation function in that direction. It uses the Brent's method.
evaluation | Neural network's evaluation value. | |
training_direction | Training direction vector. | |
initial_training_rate | Initial training rate in line minimization. |
Definition at line 1684 of file TrainingAlgorithm.cpp.
Vector< double > Flood::TrainingAlgorithm::calculate_fixed_training_rate_evaluation | ( | double | , | |
const Vector< double > & | training_direction, | |||
double | ||||
) |
This method returns a vector with two elements, a fixed training rate equal to the first training rate object member, and the evaluation for that training rate.
training_direction | Initial training direction. |
Definition at line 1492 of file TrainingAlgorithm.cpp.
Vector< double > Flood::TrainingAlgorithm::calculate_golden_section_training_rate_evaluation | ( | double | evaluation, | |
const Vector< double > & | training_direction, | |||
double | initial_training_rate | |||
) |
This method returns the training rate by searching in a given direction to locate the minimum of the objective function in that direction. It uses the golden section method.
evaluation | Neural network's evaluation value. | |
training_direction | Training direction vector. | |
initial_training_rate | Initial training rate in line minimization. |
Definition at line 1523 of file TrainingAlgorithm.cpp.
Vector< double > Flood::TrainingAlgorithm::calculate_training_rate_evaluation | ( | double | evaluation, | |
const Vector< double > & | training_direction, | |||
double | initial_training_rate | |||
) |
This method returns a vector with two elements, the training rate calculated by means of the training rate object member, and the evaluation for that training rate.
evaluation | Initial objective function evaluation. | |
training_direction | Initial training direction. | |
initial_training_rate | Initial training rate to start the algorithm. |
Definition at line 1368 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_bracketing_factor | ( | void | ) |
This method returns the increase factor when bracketing a minimum in line minimization.
Definition at line 139 of file TrainingAlgorithm.cpp.
bool Flood::TrainingAlgorithm::get_display | ( | void | ) |
This method returns true if messages from this class can be displayed on the screen, or false if messages from this class can't be displayed on the screen.
Definition at line 500 of file TrainingAlgorithm.cpp.
int Flood::TrainingAlgorithm::get_display_period | ( | void | ) |
This method returns the number of epochs between the training showing progress.
Definition at line 489 of file TrainingAlgorithm.cpp.
bool Flood::TrainingAlgorithm::get_early_stopping | ( | void | ) |
This method returns true if early stopping is to be performed during training, and false otherwise.
Definition at line 287 of file TrainingAlgorithm.cpp.
Vector< double > & Flood::TrainingAlgorithm::get_elapsed_time_history | ( | void | ) |
This method returns a matrix containing the elapsed time history over the training epochs.
Definition at line 471 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_error_gradient_norm | ( | void | ) |
This method returns the value for the norm of the gradient vector at wich an error message is written to the screen and the program exits.
Definition at line 204 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_error_parameters_norm | ( | void | ) |
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 193 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_error_training_rate | ( | void | ) |
This method returns the training rate value at wich the line minimization algorithm is assumed to fail when bracketing a minimum.
Definition at line 215 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_evaluation_goal | ( | void | ) |
This method returns the goal value for the evaluation. This is used as a stopping criterium when training a neural network.
Definition at line 246 of file TrainingAlgorithm.cpp.
Vector< double > & Flood::TrainingAlgorithm::get_evaluation_history | ( | void | ) |
This method returns a vector containing the evaluations history over the training epochs.
Definition at line 413 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_first_training_rate | ( | void | ) |
This method returns the initial training rate value in line minimization.
Definition at line 129 of file TrainingAlgorithm.cpp.
This method returns a matrix containing the gradient history over the training epochs.
Definition at line 423 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_gradient_norm_goal | ( | void | ) |
This method returns the goal value for the norm of the objective function gradient. This is used as a stopping criterium when training a neural network.
Definition at line 257 of file TrainingAlgorithm.cpp.
Vector< double > & Flood::TrainingAlgorithm::get_gradient_norm_history | ( | void | ) |
This method returns a vector containing the gradient norm history over the training epochs.
Definition at line 433 of file TrainingAlgorithm.cpp.
int Flood::TrainingAlgorithm::get_maximum_epochs_number | ( | void | ) |
This method returns the maximum number of epochs for training.
Definition at line 267 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_maximum_time | ( | void | ) |
This method returns the maximum training time.
Definition at line 277 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_minimum_evaluation_improvement | ( | void | ) |
This method returns the minimum evaluation improvement during training.
Definition at line 235 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_minimum_parameters_increment_norm | ( | void | ) |
This method returns the minimum norm of the parameter increment vector used as a stopping criteria when training.
Definition at line 225 of file TrainingAlgorithm.cpp.
ObjectiveFunctional * Flood::TrainingAlgorithm::get_objective_functional_pointer | ( | void | ) |
This method returns a pointer to the objective functional object to which the training algorithm is associated.
Definition at line 70 of file TrainingAlgorithm.cpp.
This method returns a matrix containing the parameters history over the training epochs.
Definition at line 393 of file TrainingAlgorithm.cpp.
Vector< double > & Flood::TrainingAlgorithm::get_parameters_norm_history | ( | void | ) |
This method returns a vector containing the parameters norm history over the training epochs.
Definition at line 403 of file TrainingAlgorithm.cpp.
bool Flood::TrainingAlgorithm::get_reserve_elapsed_time_history | ( | void | ) |
This method returns true if the elapsed time history vector is to be reserved, and false otherwise.
Definition at line 375 of file TrainingAlgorithm.cpp.
bool Flood::TrainingAlgorithm::get_reserve_evaluation_history | ( | void | ) |
This method returns true if the evaluation history vector is to be reserved, and false otherwise.
Definition at line 317 of file TrainingAlgorithm.cpp.
bool Flood::TrainingAlgorithm::get_reserve_gradient_history | ( | void | ) |
This method returns true if the gradient history matrix is to be reserved, and false otherwise.
Definition at line 327 of file TrainingAlgorithm.cpp.
bool Flood::TrainingAlgorithm::get_reserve_gradient_norm_history | ( | void | ) |
This method returns true if the gradient norm history vector is to be reserved, and false otherwise.
Definition at line 337 of file TrainingAlgorithm.cpp.
bool Flood::TrainingAlgorithm::get_reserve_parameters_history | ( | void | ) |
This method returns true if the parameters history matrix is to be reserved, and false otherwise.
Definition at line 297 of file TrainingAlgorithm.cpp.
bool Flood::TrainingAlgorithm::get_reserve_parameters_norm_history | ( | void | ) |
This method returns true if the parameters norm history vector is to be reserved, and false otherwise.
Definition at line 307 of file TrainingAlgorithm.cpp.
bool Flood::TrainingAlgorithm::get_reserve_training_direction_history | ( | void | ) |
This method returns true if the training direction history matrix is to be reserved, and false otherwise.
Definition at line 355 of file TrainingAlgorithm.cpp.
bool Flood::TrainingAlgorithm::get_reserve_training_rate_history | ( | void | ) |
This method returns true if the training rate history vector is to be reserved, and false otherwise.
Definition at line 365 of file TrainingAlgorithm.cpp.
This method returns the training direction history matrix.
Definition at line 451 of file TrainingAlgorithm.cpp.
std::string Flood::TrainingAlgorithm::get_training_history_XML | ( | bool | show_declaration | ) | [virtual] |
This method returns a string with the history of the training process in XML-type format. Only that training history variables which have been reserved are included here.
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Reimplemented in Flood::ConjugateGradient, Flood::EvolutionaryAlgorithm, Flood::GradientDescent, Flood::NewtonMethod, Flood::QuasiNewtonMethod, and Flood::RandomSearch.
Definition at line 2876 of file TrainingAlgorithm.cpp.
Vector< double > & Flood::TrainingAlgorithm::get_training_rate_history | ( | void | ) |
This method returns the training rate history vector.
Definition at line 461 of file TrainingAlgorithm.cpp.
TrainingAlgorithm::TrainingRateMethod Flood::TrainingAlgorithm::get_training_rate_method | ( | void | ) |
This method returns the training rate method used for training.
Definition at line 80 of file TrainingAlgorithm.cpp.
std::string Flood::TrainingAlgorithm::get_training_rate_method_name | ( | void | ) |
This method returns a string with the name of the training rate method to be used.
Definition at line 90 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_training_rate_tolerance | ( | void | ) |
This method returns the tolerance value in line minimization.
Definition at line 149 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_warning_gradient_norm | ( | void | ) |
This method returns the minimum value for the norm of the gradient vector at wich a warning message is written to the screen.
Definition at line 171 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_warning_parameters_norm | ( | void | ) |
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 160 of file TrainingAlgorithm.cpp.
double Flood::TrainingAlgorithm::get_warning_training_rate | ( | void | ) |
This method returns the training rate value at wich a warning message is written to the screen during line minimization.
Definition at line 182 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::load | ( | const char * | filename | ) | [virtual] |
This method loads a gradient descent object from a XML-type file. Please mind about the file format, wich is specified in the User's Guide.
filename | Name of training algorithm XML-type file. |
Reimplemented in Flood::ConjugateGradient, Flood::EvolutionaryAlgorithm, Flood::GradientDescent, Flood::NewtonMethod, Flood::QuasiNewtonMethod, and Flood::RandomSearch.
Definition at line 2145 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::print | ( | void | ) |
This method prints to the screen the XML-type representation of the training algorithm object.
Definition at line 2103 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::print_training_history | ( | void | ) |
This method prints to the screen the history of the training process for the reserved variables.
Definition at line 2980 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::resize_training_history | ( | int | new_size | ) | [virtual] |
This method resizes all the default training history vectors.
new_size | Size vectors containing the training history variables. |
Reimplemented in Flood::ConjugateGradient, Flood::EvolutionaryAlgorithm, Flood::GradientDescent, Flood::NewtonMethod, Flood::QuasiNewtonMethod, and Flood::RandomSearch.
Definition at line 2810 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::save | ( | const char * | filename | ) |
This method saves to a XML-type file the members of the training algorithm object.
filename | Name of training algorithm XML-type file. |
Definition at line 2114 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::save_training_history | ( | const char * | filename | ) |
This method saves the training history to a XML-type file.
filename | Training history XML-type filename. |
Definition at line 2991 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set | ( | ObjectiveFunctional * | new_objective_functional_pointer | ) |
This method sets a new objective functional pointer. It also sets the rest of members to their default values.
new_objective_functional_pointer | Pointer to an objective functional object. |
Reimplemented in Flood::EvolutionaryAlgorithm.
Definition at line 524 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set | ( | void | ) |
This method sets the objective functional pointer to NULL. It also sets the rest of members to their default values.
Reimplemented in Flood::EvolutionaryAlgorithm.
Definition at line 511 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_bracketing_factor | ( | double | new_bracketing_factor | ) |
This method sets a new increase factor value to be used for line minimization when bracketing a minimum.
new_bracketing_factor | Bracketing factor value. |
Definition at line 706 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_default | ( | void | ) | [virtual] |
This method sets the members of the training algorithm object to their default values:
Reimplemented in Flood::EvolutionaryAlgorithm, and Flood::RandomSearch.
Definition at line 567 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_display | ( | bool | new_display | ) |
This method sets a new display value. If it is set to true messages from this class are to be displayed on the screen; if it is set to false messages from this class are not to be displayed on the screen.
new_display | Display value. |
Definition at line 1353 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_display_period | ( | 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 1325 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_early_stopping | ( | bool | new_early_stopping | ) |
This method activates or not early stopping in the training process.
new_early_stopping | True if early stopping is to be performed, false otherwise. |
Definition at line 1085 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_elapsed_time_history | ( | const Vector< double > & | new_elapsed_time_history | ) |
This method sets a new elapsed time history vector. The elements in the vector are the measured times over the training epochs.
new_elapsed_time_history | Elapsed time history vector. |
Definition at line 1313 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_error_gradient_norm | ( | double | new_error_gradient_norm | ) |
This method sets a new value for the gradient vector norm at which an error message is written to the screen and the program exits.
new_error_gradient_norm | Error norm of gradient vector value. |
Definition at line 875 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_error_parameters_norm | ( | 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 846 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_error_training_rate | ( | 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 904 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_evaluation_goal | ( | double | new_evaluation_goal | ) |
This method sets a new goal value for the evaluation. This is used as a stopping criterium when training a neural network.
new_evaluation_goal | Goal value for the evaluation. |
Definition at line 989 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_evaluation_history | ( | const Vector< double > & | new_evaluation_history | ) |
This method sets a new vector containing the evaluation history over the training epochs. Each row in the matrix contains the parameters vector of one single epoch.
new_evaluation_history | Evaluation history vector. |
Definition at line 1240 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_first_training_rate | ( | double | new_first_training_rate | ) |
This method sets a new value to be used as an initial training rate in line minimization.
new_first_training_rate | Initial training rate value. |
Definition at line 678 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_gradient_history | ( | const Vector< Vector< double > > & | new_gradient_history | ) |
This method sets a new gradient history matrix over the training epochs. The number of rows must be equal to the training size. The number of columns must be equal to the number of parameters.
new_gradient_history | Gradient history matrix. |
Definition at line 1253 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_gradient_norm_goal | ( | double | new_gradient_norm_goal | ) |
This method sets a new the goal value for the norm of the objective function gradient. This is used as a stopping criterium when training a neural network.
new_gradient_norm_goal | Goal value for the norm of the objective function gradient. |
Definition at line 1001 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_gradient_norm_history | ( | const Vector< double > & | new_gradient_norm_history | ) |
This method sets a new gradient norm history vector. The elements in the vector are the gradient norm values over the training epochs.
new_gradient_norm_history | Gradient norm history vector. |
Definition at line 1265 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_inverse_Hessian_history | ( | const Vector< Matrix< double > > & | new_inverse_Hessian_history | ) |
This method sets a new history of the inverse Hessian over the epochs from a vector of matrices.
new_inverse_Hessian_history | History of the inverse Hessian matrix. |
Definition at line 1276 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_maximum_epochs_number | ( | 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 1029 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_maximum_time | ( | double | new_maximum_time | ) |
This method sets a new maximum training time.
new_maximum_time | Maximum training time. |
Definition at line 1057 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_minimum_evaluation_improvement | ( | double | new_minimum_evaluation_improvement | ) |
This method sets a new minimum evaluation improvement during training.
new_minimum_evaluation_improvement | Minimum improvement in the evaluation between two epochs. |
Definition at line 960 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_minimum_parameters_increment_norm | ( | 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 932 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_objective_functional_pointer | ( | ObjectiveFunctional * | new_objective_functional_pointer | ) |
This method sets a pointer to an objective functional object to be associated to the training algorithm.
new_objective_functional_pointer | Pointer to an objective functional object. |
Definition at line 626 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_parameters_history | ( | const Vector< Vector< double > > & | new_parameters_history | ) |
This method sets a new vector of vectors containing the parameters history over the training epochs. Each element in the vector contains the parameters of a single epoch.
new_parameters_history | Free parameters history vector of vectors. |
Definition at line 1215 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_parameters_norm_history | ( | const Vector< double > & | new_parameters_norm_history | ) |
This method sets a new matrix containing the parameters norm history over the training epochs. Each element in the vector contains the parameters norm of one single epoch.
new_parameters_norm_history | Free parameters norm history vector. |
Definition at line 1228 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_reserve_all_training_history | ( | 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 default variables to reseved or not in memory. Reserving all the training history is memory expensive.
new_reserve_all_training_history | True if the training history of all variables is to be reserved, false otherwise. |
Reimplemented in Flood::ConjugateGradient, Flood::EvolutionaryAlgorithm, Flood::GradientDescent, Flood::NewtonMethod, Flood::QuasiNewtonMethod, and Flood::RandomSearch.
Definition at line 2787 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_reserve_elapsed_time_history | ( | 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 1191 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_reserve_evaluation_history | ( | bool | new_reserve_evaluation_history | ) |
This method makes the evaluation history vector to be reseved or not in memory.
new_reserve_evaluation_history | True if the evaluation history vector is to be reserved, false otherwise. |
Definition at line 1120 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_reserve_gradient_history | ( | bool | new_reserve_gradient_history | ) |
This method makes the gradient history vector of vectors to be reseved or not in memory.
new_reserve_gradient_history | True if the gradient history matrix is to be reserved, false otherwise. |
Definition at line 1131 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_reserve_gradient_norm_history | ( | bool | new_reserve_gradient_norm_history | ) |
This method makes the gradient norm history vector to be reseved or not in memory.
new_reserve_gradient_norm_history | True if the gradient norm history matrix is to be reserved, false otherwise. |
Definition at line 1143 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_reserve_inverse_Hessian_history | ( | bool | new_reserve_inverse_Hessian_history | ) |
This method sets the history of the inverse of the Hessian matrix to be reserved or not in memory. This is a vector of matrices.
new_reserve_inverse_Hessian_history | True if the inverse Hessian history is to be reserved, false otherwise. |
Definition at line 1155 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_reserve_parameters_history | ( | bool | new_reserve_parameters_history | ) |
This method makes the parameters history vector of vectors to be reseved or not in memory.
new_reserve_parameters_history | True if the parameters history matrix is to be reserved, false otherwise. |
Definition at line 1097 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_reserve_parameters_norm_history | ( | bool | new_reserve_parameters_norm_history | ) |
This method makes the parameters norm history vector to be reseved or not in memory.
new_reserve_parameters_norm_history | True if the parameters norm history vector is to be reserved, false otherwise. |
Definition at line 1109 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_reserve_training_direction_history | ( | 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 1167 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_reserve_training_rate_history | ( | 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 1179 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_reserve_validation_error_history | ( | bool | new_reserve_validation_error_history | ) |
This method makes the validation error history to be reserved or not in memory. This is a vector.
new_reserve_validation_error_history | True if the validation error history is to be reserved, false otherwise. |
Definition at line 1203 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_training_direction_history | ( | const Vector< Vector< double > > & | new_training_direction_history | ) |
This method sets a new vector of vectors containing the training direction history over the training epochs. Each element contains the training direction vector of one single epoch.
new_training_direction_history | Training direction history. |
Definition at line 1289 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_training_rate_history | ( | const Vector< double > & | new_training_rate_history | ) |
This method sets a new vector containing the training rate history over the training epochs. Each element in the vector contains the training rate of one single epoch.
new_training_rate_history | Training rate history vector. |
Definition at line 1301 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_training_rate_method | ( | const std::string & | new_training_rate_method_name | ) |
This method sets the method for obtaining the training rate from a string with the name of the method.
new_training_rate_method_name | Name of training rate method |
Definition at line 648 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_training_rate_method | ( | const TrainingRateMethod & | new_training_rate_method | ) |
This method sets a new training rate method to be used for training.
new_training_rate_method | Training rate method. |
Definition at line 637 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_training_rate_tolerance | ( | double | new_training_rate_tolerance | ) |
This method sets a new tolerance value to be used in line minimization.
new_training_rate_tolerance | Tolerance value in line minimization. |
Definition at line 732 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_warning_gradient_norm | ( | double | new_warning_gradient_norm | ) |
This method sets a new value for the gradient vector norm at which a warning message is written to the screen.
new_warning_gradient_norm | Warning norm of gradient vector value. |
Definition at line 790 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_warning_parameters_norm | ( | 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 761 of file TrainingAlgorithm.cpp.
void Flood::TrainingAlgorithm::set_warning_training_rate | ( | 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 819 of file TrainingAlgorithm.cpp.
std::string Flood::TrainingAlgorithm::to_XML | ( | bool | show_declaration | ) | [virtual] |
This method returns a default string representation in XML-type format of the training algorithm object. This containts the training operators, the training parameters, stopping criteria and other stuff.
show_declaration | True if an XML-type declaration is to be included at the beginning. |
Reimplemented in Flood::ConjugateGradient, Flood::EvolutionaryAlgorithm, Flood::GradientDescent, Flood::NewtonMethod, Flood::QuasiNewtonMethod, and Flood::RandomSearch.
Definition at line 1956 of file TrainingAlgorithm.cpp.
virtual void Flood::TrainingAlgorithm::train | ( | void | ) | [pure virtual] |
This method trains a multilayer perceptron which has a objective functional associated.
Implemented in Flood::ConjugateGradient, Flood::EvolutionaryAlgorithm, Flood::GradientDescent, Flood::NewtonMethod, Flood::QuasiNewtonMethod, and Flood::RandomSearch.
double Flood::TrainingAlgorithm::bracketing_factor [protected] |
bool Flood::TrainingAlgorithm::display [protected] |
int Flood::TrainingAlgorithm::display_period [protected] |
Number of epochs between the training showing progress.
Definition at line 418 of file TrainingAlgorithm.h.
bool Flood::TrainingAlgorithm::early_stopping [protected] |
True if early stopping is to be performed, and false otherwise.
Definition at line 326 of file TrainingAlgorithm.h.
Vector<double> Flood::TrainingAlgorithm::elapsed_time_history [protected] |
Vector containing the elapsed time history over the training epochs.
Definition at line 404 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::error_gradient_norm [protected] |
Value for the gradient norm at which the training process is assumed to fail.
Definition at line 291 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::error_parameters_norm [protected] |
Value for the parameters norm at which the training process is assumed to fail.
Definition at line 287 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::error_training_rate [protected] |
Training rate at wich the line minimization algorithm is assumed to be unable to bracket a minimum.
Definition at line 295 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::evaluation_goal [protected] |
Goal value for the objective. It is used as a train stopping criterion.
Definition at line 310 of file TrainingAlgorithm.h.
Vector<double> Flood::TrainingAlgorithm::evaluation_history [protected] |
Vector containing the evaluation history over the training epochs.
Definition at line 380 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::first_training_rate [protected] |
Vector< Vector<double> > Flood::TrainingAlgorithm::gradient_history [protected] |
Vector of vectors containing the gradient history over the training epochs.
Definition at line 384 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::gradient_norm_goal [protected] |
Goal value for the norm of the objective function gradient. It is used as a stopping criterion.
Definition at line 314 of file TrainingAlgorithm.h.
Vector<double> Flood::TrainingAlgorithm::gradient_norm_history [protected] |
Vector containing the gradient norm history over the training epochs.
Definition at line 388 of file TrainingAlgorithm.h.
Vector< Matrix<double> > Flood::TrainingAlgorithm::inverse_Hessian_history [protected] |
Vector of matrices containing the history of the inverse Hessian over the epochs.
Definition at line 392 of file TrainingAlgorithm.h.
int Flood::TrainingAlgorithm::maximum_epochs_number [protected] |
Maximum number of epochs to train. It is used as a train stopping criterion.
Definition at line 318 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::maximum_time [protected] |
Maximum training time. It is used as a train stopping criterion.
Definition at line 322 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::minimum_evaluation_improvement [protected] |
Minimum evaluation improvement between two successive epochs. It is used as a train stopping criterion.
Definition at line 306 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::minimum_parameters_increment_norm [protected] |
Norm of the parameters increment vector at which training stops.
Definition at line 302 of file TrainingAlgorithm.h.
Pointer to an objective functional for a multilayer perceptron object.
Definition at line 253 of file TrainingAlgorithm.h.
Vector< Vector<double> > Flood::TrainingAlgorithm::parameters_history [protected] |
Vector of vectors containing the parameters history over the training epochs.
Definition at line 372 of file TrainingAlgorithm.h.
Vector<double> Flood::TrainingAlgorithm::parameters_norm_history [protected] |
Vector containing the parameters norm history over the training epochs.
Definition at line 376 of file TrainingAlgorithm.h.
bool Flood::TrainingAlgorithm::reserve_elapsed_time_history [protected] |
True if the elapsed time history vector is to be reserved, false otherwise.
Definition at line 364 of file TrainingAlgorithm.h.
bool Flood::TrainingAlgorithm::reserve_evaluation_history [protected] |
True if the evaluation history vector is to be reserved, false otherwise.
Definition at line 340 of file TrainingAlgorithm.h.
bool Flood::TrainingAlgorithm::reserve_gradient_history [protected] |
True if the gradient history matrix is to be reserved, false otherwise.
Definition at line 344 of file TrainingAlgorithm.h.
bool Flood::TrainingAlgorithm::reserve_gradient_norm_history [protected] |
True if the gradient norm history vector is to be reserved, false otherwise.
Definition at line 348 of file TrainingAlgorithm.h.
bool Flood::TrainingAlgorithm::reserve_inverse_Hessian_history [protected] |
True if the inverse Hessian history vector of matrices is to be reserved, false otherwise.
Definition at line 352 of file TrainingAlgorithm.h.
bool Flood::TrainingAlgorithm::reserve_parameters_history [protected] |
True if the parameters history matrix is to be reserved, false otherwise.
Definition at line 332 of file TrainingAlgorithm.h.
bool Flood::TrainingAlgorithm::reserve_parameters_norm_history [protected] |
True if the parameters norm history vector is to be reserved, false otherwise.
Definition at line 336 of file TrainingAlgorithm.h.
bool Flood::TrainingAlgorithm::reserve_training_direction_history [protected] |
True if the training direction history matrix is to be reserved, false otherwise.
Definition at line 356 of file TrainingAlgorithm.h.
bool Flood::TrainingAlgorithm::reserve_training_rate_history [protected] |
True if the training rate history vector is to be reserved, false otherwise.
Definition at line 360 of file TrainingAlgorithm.h.
bool Flood::TrainingAlgorithm::reserve_validation_error_history [protected] |
True if the validation error history vector is to be reserved, false otherwise.
Definition at line 368 of file TrainingAlgorithm.h.
Vector< Vector<double> > Flood::TrainingAlgorithm::training_direction_history [protected] |
Vector of vectors containing the training direction history over the epochs.
Definition at line 396 of file TrainingAlgorithm.h.
Vector<double> Flood::TrainingAlgorithm::training_rate_history [protected] |
Vector containing the training rate history over the epochs.
Definition at line 400 of file TrainingAlgorithm.h.
Variable containing the actual method used to obtain a suitable train rate.
Definition at line 259 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::training_rate_tolerance [protected] |
Vector<double> Flood::TrainingAlgorithm::validation_error_history [protected] |
Vector containing the validation error history over the training epochs.
Definition at line 408 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::warning_gradient_norm [protected] |
Value for the gradient norm at which a warning message is written to the screen.
Definition at line 279 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::warning_parameters_norm [protected] |
Value for the parameters norm at which a warning message is written to the screen.
Definition at line 275 of file TrainingAlgorithm.h.
double Flood::TrainingAlgorithm::warning_training_rate [protected] |
Training rate value at wich a warning message is written to the screen.
Definition at line 283 of file TrainingAlgorithm.h.