#include <QuasiNewtonMethod.h>
Definition at line 28 of file QuasiNewtonMethod.h.
Enumeration of the available training operators for obtaining the approximation to the inverse Hessian.
Definition at line 37 of file QuasiNewtonMethod.h.
Flood::QuasiNewtonMethod::QuasiNewtonMethod | ( | ObjectiveFunctional * | new_objective_functional_pointer | ) | [explicit] |
General constructor. It creates a quasi-Newton method training algorithm object associated to an objective functional object. It also initializes the class members to their default values.
new_objective_functional_pointer | Pointer to an objective functional object. |
Definition at line 42 of file QuasiNewtonMethod.cpp.
Flood::QuasiNewtonMethod::QuasiNewtonMethod | ( | void | ) | [explicit] |
Default constructor. It creates a quasi-Newton method training algorithm object not associated to any objective functional object. It also initializes the class members to their default values.
Definition at line 57 of file QuasiNewtonMethod.cpp.
Flood::QuasiNewtonMethod::~QuasiNewtonMethod | ( | void | ) | [virtual] |
Matrix< double > Flood::QuasiNewtonMethod::calculate_inverse_Hessian_approximation | ( | const Vector< double > & | old_parameters, | |
const Vector< double > & | parameters, | |||
const Vector< double > & | old_gradient, | |||
const Vector< double > & | gradient, | |||
const Matrix< double > & | old_inverse_Hessian | |||
) |
This method calculates an approximation of the inverse Hessian, accoring to the method used.
old_parameters | Another point of the objective function. | |
parameters | Current point of the objective function | |
old_gradient | Gradient at the other point. | |
gradient | Gradient at the current point. | |
old_inverse_Hessian | Inverse Hessian at the other point of the objective function. |
Definition at line 380 of file QuasiNewtonMethod.cpp.
QuasiNewtonMethod::InverseHessianApproximationMethod Flood::QuasiNewtonMethod::get_inverse_Hessian_approximation_method | ( | void | ) |
This method returns the method for approximating the inverse Hessian matrix to be used when training.
Definition at line 81 of file QuasiNewtonMethod.cpp.
std::string Flood::QuasiNewtonMethod::get_inverse_Hessian_approximation_method_name | ( | void | ) |
This method returns the name of the method for the approximation of the inverse Hessian.
Definition at line 91 of file QuasiNewtonMethod.cpp.
std::string Flood::QuasiNewtonMethod::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 from Flood::TrainingAlgorithm.
Definition at line 253 of file QuasiNewtonMethod.cpp.
void Flood::QuasiNewtonMethod::load | ( | const char * | filename | ) | [virtual] |
This method loads a quasi-Newton method object from a XML-type file. Please mind about the file format, wich is specified in the User's Guide.
filename | Name of XML-type file. |
Reimplemented from Flood::TrainingAlgorithm.
Definition at line 968 of file QuasiNewtonMethod.cpp.
void Flood::QuasiNewtonMethod::resize_training_history | ( | int | new_size | ) | [virtual] |
This method resizes all the training history vectors.
new_size | Size vectors containing the training history variables. |
Reimplemented from Flood::TrainingAlgorithm.
Definition at line 187 of file QuasiNewtonMethod.cpp.
void Flood::QuasiNewtonMethod::set_inverse_Hessian_approximation_method | ( | const std::string & | new_inverse_Hessian_approximation_method_name | ) |
This method sets a new method for approximating the inverse of the Hessian matrix from a string containing the name. Possible values are:
Definition at line 142 of file QuasiNewtonMethod.cpp.
void Flood::QuasiNewtonMethod::set_inverse_Hessian_approximation_method | ( | const InverseHessianApproximationMethod & | new_inverse_Hessian_approximation_method | ) |
This method sets a new inverse Hessian approximatation method value.
new_inverse_Hessian_approximation_method | Inverse Hessian approximation method value. |
Definition at line 125 of file QuasiNewtonMethod.cpp.
void Flood::QuasiNewtonMethod::set_reserve_all_training_history | ( | bool | new_reserve_all_training_history | ) | [virtual] |
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. |
Reimplemented from Flood::TrainingAlgorithm.
Definition at line 169 of file QuasiNewtonMethod.cpp.
std::string Flood::QuasiNewtonMethod::to_XML | ( | bool | show_declaration | ) | [virtual] |
This method returns a XML-type string representation of this quasi-Newton method object. It contains the training methods and parameters chosen, as well as the stopping criteria and other user stuff concerning the quasi-Newton method object.
show_declaration | True if a XML-type declaration is to be included at the begining of the string. |
Reimplemented from Flood::TrainingAlgorithm.
Definition at line 833 of file QuasiNewtonMethod.cpp.
void Flood::QuasiNewtonMethod::train | ( | void | ) | [virtual] |
This method trains a multilayer perceptron with an associated objective function according to the quasi-Newton method. Training occurs according to the training operators, training parameters and stopping criteria.
Implements Flood::TrainingAlgorithm.
Definition at line 440 of file QuasiNewtonMethod.cpp.