Flood::QuasiNewtonMethod Class Reference

#include <QuasiNewtonMethod.h>

Inheritance diagram for Flood::QuasiNewtonMethod:

Flood::TrainingAlgorithm

List of all members.

Public Types

enum  InverseHessianApproximationMethod { DFP, BFGS }

Public Member Functions

 QuasiNewtonMethod (ObjectiveFunctional *)
 QuasiNewtonMethod (void)
virtual ~QuasiNewtonMethod (void)
InverseHessianApproximationMethod get_inverse_Hessian_approximation_method (void)
std::string get_inverse_Hessian_approximation_method_name (void)
void set_inverse_Hessian_approximation_method (const InverseHessianApproximationMethod &)
void set_inverse_Hessian_approximation_method (const std::string &)
Vector< double > calculate_training_direction (const Vector< double > &, const Matrix< double > &)
Matrix< double > calculate_inverse_Hessian_approximation (const Vector< double > &, const Vector< double > &, const Vector< double > &, const Vector< double > &, const Matrix< double > &)
Vector< double > calculate_gradient_descent_training_direction (const Vector< double > &)
void train (void)
void resize_training_history (int)
void set_reserve_all_training_history (bool)
std::string get_training_history_XML (bool)
std::string to_XML (bool)
void load (const char *)


Detailed Description

This concrete class represents a quasi-Newton training algorithm for an objective functional of a multilayer perceptron.

Definition at line 28 of file QuasiNewtonMethod.h.


Member Enumeration Documentation

Enumeration of the available training operators for obtaining the approximation to the inverse Hessian.

Definition at line 37 of file QuasiNewtonMethod.h.


Constructor & Destructor Documentation

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.

Parameters:
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]

Destructor.

Definition at line 69 of file QuasiNewtonMethod.cpp.


Member Function Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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:

  • "DFP"
  • "BFGS"
    new_inverse_Hessian_approximation_method_name Name of inverse Hessian approximation method.

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.


The documentation for this class was generated from the following files:

Generated on Fri Jul 30 09:52:00 2010 for Flood by  doxygen 1.5.9