#include <GradientDescent.h>
Public Member Functions | |
GradientDescent (ObjectiveFunctional *) | |
GradientDescent (void) | |
virtual | ~GradientDescent (void) |
void | set_reserve_all_training_history (bool) |
Vector< double > | calculate_training_direction (const Vector< double > &) |
void | train (void) |
void | resize_training_history (int) |
std::string | get_training_history_XML (bool) |
std::string | to_XML (bool) |
void | load (const char *) |
Definition at line 29 of file GradientDescent.h.
Flood::GradientDescent::GradientDescent | ( | ObjectiveFunctional * | new_objective_functional_pointer | ) | [explicit] |
General constructor. It creates a gradient descent training algorithm object associated to an objective functional object. It also initializes the class members to their default values:
Training operators:
Training parameters:
Stopping criteria:
User stuff:
new_objective_functional_pointer | Pointer to an objective functional object. |
Definition at line 67 of file GradientDescent.cpp.
Flood::GradientDescent::GradientDescent | ( | void | ) | [explicit] |
Default constructor. It creates a gradient descent training algorithm object not associated to any objective functional object. It also initializes the class members to their default values:
Training operators:
Training parameters:
Stopping criteria:
User stuff:
Definition at line 107 of file GradientDescent.cpp.
Flood::GradientDescent::~GradientDescent | ( | void | ) | [virtual] |
std::string Flood::GradientDescent::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 647 of file GradientDescent.cpp.
void Flood::GradientDescent::load | ( | const char * | filename | ) | [virtual] |
This method loads a conjugate gradient object from an XML-type file. Please mind about the file format, wich is specified in the User's Guide.
filename | Name of conjugate gradient XML-type. |
Reimplemented from Flood::TrainingAlgorithm.
Definition at line 730 of file GradientDescent.cpp.
void Flood::GradientDescent::resize_training_history | ( | int | new_size | ) | [virtual] |
This method resizes the vectors or matrices containing training history information to a new size:
new_size | Size of training history. |
Reimplemented from Flood::TrainingAlgorithm.
Definition at line 1270 of file GradientDescent.cpp.
void Flood::GradientDescent::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 139 of file GradientDescent.cpp.
std::string Flood::GradientDescent::to_XML | ( | bool | show_declaration | ) | [virtual] |
This method prints to the screen the training parameters, the stopping criteria and other user stuff concerning the gradient descent object.
show_declaration | True if a XML-type declaration is wanted, false otherwise. |
Reimplemented from Flood::TrainingAlgorithm.
Definition at line 514 of file GradientDescent.cpp.
void Flood::GradientDescent::train | ( | void | ) | [virtual] |
This method trains a multilayer perceptron with an associated objective functional according to the gradient descent algorithm. Training occurs according to the training operators, training parameters and stopping criteria.
Implements Flood::TrainingAlgorithm.
Definition at line 180 of file GradientDescent.cpp.