#include <performance_term.h>
Definition at line 45 of file performance_term.h.
OpenNN::PerformanceTerm::PerformanceTerm | ( | void | ) | [explicit] |
Default constructor. It creates a default performance term object, with all pointers initialized to NULL. It also initializes all the rest of class members to their default values.
Definition at line 46 of file performance_term.cpp.
OpenNN::PerformanceTerm::PerformanceTerm | ( | NeuralNetwork * | new_neural_network_pointer | ) | [explicit] |
Neural network constructor. It creates a performance term object associated to a neural network object. The rest of pointers are initialized to NULL. It also initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. |
Definition at line 64 of file performance_term.cpp.
OpenNN::PerformanceTerm::PerformanceTerm | ( | DataSet * | new_data_set_pointer | ) | [explicit] |
Data set constructor. It creates a performance term object associated to a given data set object. The rest of pointers are initialized to NULL. It also initializes all the rest of class members to their default values.
new_data_set_pointer | Pointer to a data set object. |
Definition at line 82 of file performance_term.cpp.
OpenNN::PerformanceTerm::PerformanceTerm | ( | MathematicalModel * | new_mathematical_model_pointer | ) | [explicit] |
Mathematical model constructor. It creates a performance term object associated to a given mathematical model object. The rest of pointers are initialized to NULL. It also initializes all the rest of class members to their default values.
new_mathematical_model_pointer | Pointer to a mathematical model object. |
Definition at line 100 of file performance_term.cpp.
OpenNN::PerformanceTerm::PerformanceTerm | ( | NeuralNetwork * | new_neural_network_pointer, | |
DataSet * | new_data_set_pointer | |||
) | [explicit] |
Neural network and data set constructor. It creates a performance term object associated to a neural network and to be measured on a data set. The rest of pointers are initialized to NULL. It also initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. | |
new_data_set_pointer | Pointer to a data set object. |
Definition at line 119 of file performance_term.cpp.
OpenNN::PerformanceTerm::PerformanceTerm | ( | NeuralNetwork * | new_neural_network_pointer, | |
MathematicalModel * | new_mathematical_model_pointer | |||
) | [explicit] |
Neural network and mathematical model constructor. It creates a performance term object associated to a neural network and to be measured on a mathematical model. The rest of pointers are initialized to NULL. It also initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. | |
new_mathematical_model_pointer | Pointer to a mathematical model object. |
Definition at line 138 of file performance_term.cpp.
OpenNN::PerformanceTerm::PerformanceTerm | ( | NeuralNetwork * | new_neural_network_pointer, | |
MathematicalModel * | new_mathematical_model_pointer, | |||
DataSet * | new_data_set_pointer | |||
) | [explicit] |
Neural network, mathematical model and data set constructor. It creates a performance term object associated to a neural network and to be measured on both a mathematical model and a data set. The rest of pointers are initialized to NULL. It also initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. | |
new_mathematical_model_pointer | Pointer to a mathematical model object. | |
new_data_set_pointer | Pointer to a data set object. |
Definition at line 158 of file performance_term.cpp.
OpenNN::PerformanceTerm::PerformanceTerm | ( | TiXmlElement * | performance_term_element | ) | [explicit] |
XML constructor. It creates a default performance term object, with all pointers initialized to NULL. It also loads all the rest of class members from a XML element.
performance_term_element | Pointer to a TinyXML element with the object data. |
Definition at line 175 of file performance_term.cpp.
OpenNN::PerformanceTerm::PerformanceTerm | ( | const PerformanceTerm & | other_performance_term | ) |
Copy constructor. It creates a copy of an existing performance term object.
other_performance_term | Performance term object to be copied. |
Definition at line 193 of file performance_term.cpp.
OpenNN::PerformanceTerm::~PerformanceTerm | ( | void | ) | [virtual] |
Destructor. It deletes the numerical differentiation object composing this performance term object.
Definition at line 218 of file performance_term.cpp.
PerformanceTerm & OpenNN::PerformanceTerm::operator= | ( | const PerformanceTerm & | other_performance_term | ) | [virtual] |
Assignment operator. It assigns to this performance term object the members from another performance term object.
other_performance_term | Performance term object to be copied. |
Definition at line 232 of file performance_term.cpp.
bool OpenNN::PerformanceTerm::operator== | ( | const PerformanceTerm & | other_performance_term | ) | const [virtual] |
Equal to operator. It compares this object to another object. The return is true if both objects have the same member data, and false otherwise.
Definition at line 255 of file performance_term.cpp.
NeuralNetwork* OpenNN::PerformanceTerm::get_neural_network_pointer | ( | void | ) | const [inline] |
This method returns a pointer to the neural network object associated to the performance term.
Definition at line 165 of file performance_term.h.
MathematicalModel* OpenNN::PerformanceTerm::get_mathemtaical_model_pointer | ( | void | ) | const [inline] |
This method returns a pointer to the mathematical model object associated to the performance term.
Definition at line 173 of file performance_term.h.
DataSet* OpenNN::PerformanceTerm::get_data_set_pointer | ( | void | ) | const [inline] |
This method returns a pointer to the data set object associated to the performance term.
Definition at line 181 of file performance_term.h.
NumericalDifferentiation* OpenNN::PerformanceTerm::get_numerical_differentiation_pointer | ( | void | ) | const [inline] |
This method returns a pointer to the numerical differentiation object used in this performance term object.
Definition at line 189 of file performance_term.h.
const bool & OpenNN::PerformanceTerm::get_display | ( | void | ) | const |
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 279 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set | ( | void | ) | [virtual] |
This method sets all the member pointers to NULL (neural network, data set, mathematical model and numerical differentiation). It also initializes all the rest of class members to their default values.
Reimplemented in OpenNN::FinalSolutionsError.
Definition at line 290 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set | ( | NeuralNetwork * | new_neural_network_pointer | ) | [virtual] |
This method sets all the member pointers to NULL, but the neural network, which set to a given pointer. It also initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. |
Reimplemented in OpenNN::FinalSolutionsError.
Definition at line 307 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set | ( | DataSet * | new_data_set_pointer | ) | [virtual] |
This method sets all the member pointers to NULL, but the data set, which set to a given pointer. It also initializes all the rest of class members to their default values.
new_data_set_pointer | Pointer to a data set object. |
Definition at line 324 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set | ( | MathematicalModel * | new_mathematical_model_pointer | ) | [virtual] |
This method sets all the member pointers to NULL, but the mathematical model, which set to a given pointer. It also initializes all the rest of class members to their default values.
new_mathematical_model_pointer | Pointer to a mathematical model object. |
Reimplemented in OpenNN::FinalSolutionsError.
Definition at line 341 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set | ( | NeuralNetwork * | new_neural_network_pointer, | |
DataSet * | new_data_set_pointer | |||
) | [virtual] |
This method sets new neural network and data set pointers. It also sets the mathematical model and numerical differentiation pointers to NULL. Finally, it initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. | |
new_data_set_pointer | Pointer to a data set object. |
Definition at line 360 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set | ( | NeuralNetwork * | new_neural_network_pointer, | |
MathematicalModel * | new_mathematical_model_pointer | |||
) | [virtual] |
This method sets new neural network and mathematical model pointers. It also sets the data set and numerical differentiation pointers to NULL. Finally, it initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. | |
new_mathematical_model_pointer | Pointer to a data set object. |
Reimplemented in OpenNN::FinalSolutionsError.
Definition at line 379 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set | ( | NeuralNetwork * | new_neural_network_pointer, | |
MathematicalModel * | new_mathematical_model_pointer, | |||
DataSet * | new_data_set_pointer | |||
) | [virtual] |
This method sets new neural network, mathematical model and data set pointers. The numerical differentiation pointer is set to NULL. It also initializes all the rest of class members to their default values.
new_neural_network_pointer | Pointer to a neural network object. | |
new_mathematical_model_pointer | Pointer to mathematical model object. | |
new_data_set_pointer | Pointer to a data set object. |
Definition at line 399 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set | ( | const PerformanceTerm & | other_performance_term | ) | [virtual] |
This method sets to this performance term object the members of another performance term object.
other_performance_term | Performance term to be copied. |
Definition at line 415 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set_neural_network_pointer | ( | NeuralNetwork * | new_neural_network_pointer | ) | [virtual] |
This method sets a pointer to a neural network object which is to be associated to the performance term.
new_neural_network_pointer | Pointer to a neural network object to be associated to the performance term. |
Definition at line 437 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set_mathematical_model_pointer | ( | MathematicalModel * | new_mathematical_model_pointer | ) | [virtual] |
This method sets a new mathematical model on which the performance term is to be measured.
Reimplemented in OpenNN::FinalSolutionsError.
Definition at line 447 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set_data_set_pointer | ( | DataSet * | new_data_set_pointer | ) | [virtual] |
This method sets a new data set on which the performance term is to be measured.
Definition at line 457 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set_numerical_differentiation_pointer | ( | NumericalDifferentiation * | new_numerical_differentiation_pointer | ) |
This method sets a new numerical differentiation pointer in this performance term object.
new_numerical_differentiation_pointer | Pointer to a numerical differentiation object. |
Definition at line 468 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set_default | ( | void | ) | [virtual] |
This method sets the members of the performance term to their default values:
Reimplemented in OpenNN::FinalSolutionsError, OpenNN::IndependentParametersError, OpenNN::InverseSumSquaredError, OpenNN::MinkowskiError, OpenNN::NeuralParametersNorm, OpenNN::OutputsIntegrals, and OpenNN::SolutionsError.
Definition at line 481 of file performance_term.cpp.
void OpenNN::PerformanceTerm::set_display | ( | const 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 494 of file performance_term.cpp.
void OpenNN::PerformanceTerm::construct_numerical_differentiation | ( | void | ) |
This method constructs the numerical differentiation object which composes the performance term class.
Definition at line 504 of file performance_term.cpp.
void OpenNN::PerformanceTerm::delete_numerical_differentiation_pointer | ( | void | ) |
This method deletes the numerical differentiation object which composes the performance term class.
Definition at line 517 of file performance_term.cpp.
void OpenNN::PerformanceTerm::check | ( | void | ) | const [virtual] |
This method checks that there is a neural network associated to the performance term. If some of the above conditions is not hold, the method throws an exception.
Reimplemented in OpenNN::CrossEntropyError, OpenNN::FinalSolutionsError, OpenNN::IndependentParametersError, OpenNN::InverseSumSquaredError, OpenNN::MeanSquaredError, OpenNN::MinkowskiError, OpenNN::NeuralParametersNorm, OpenNN::NormalizedSquaredError, OpenNN::OutputsIntegrals, OpenNN::RootMeanSquaredError, OpenNN::SolutionsError, and OpenNN::SumSquaredError.
Definition at line 530 of file performance_term.cpp.
Vector< Vector< double > > OpenNN::PerformanceTerm::calculate_layers_delta | ( | const Vector< Vector< double > > & | layers_activation_derivative, | |
const Vector< double > & | output_objective_gradient | |||
) | const |
This method returns the delta vector for all the layers in the multilayer perceptron The format of this quantity is a vector of vectors.
layers_activation_derivative | Forward propagation activation derivative. | |
output_objective_gradient | Gradient of the outputs objective function. |
Definition at line 553 of file performance_term.cpp.
Vector< Vector< double > > OpenNN::PerformanceTerm::calculate_layers_delta | ( | const Vector< Vector< double > > & | layers_activation_derivative, | |
const Vector< double > & | homogeneous_solution, | |||
const Vector< double > & | output_objective_gradient | |||
) | const |
This method returns the delta vector for all the layers in the multilayer perceptron, when boundary conditions are imposed. The format of this quantity is a vector of vectors.
layers_activation_derivative | Forward propagation activation derivative. | |
homogeneous_solution | Homogeneous solution for calculating the conditioned outputs. | |
output_objective_gradient | Gradient of the outputs objective function. |
Definition at line 655 of file performance_term.cpp.
Matrix< Matrix< double > > OpenNN::PerformanceTerm::calculate_interlayers_Delta | ( | const Vector< Vector< double > > & | layers_activation_derivative, | |
const Vector< Vector< double > > & | layers_activation_second_derivative, | |||
const Matrix< Matrix< double > > & | interlayers_combination_combination_Jacobian_form, | |||
const Vector< double > & | output_objective_gradient, | |||
const Matrix< double > & | output_objective_Hessian, | |||
const Vector< Vector< double > > & | layers_delta | |||
) | const |
This method returns the second partial derivatives of the outputs objective function with respect to the combinations of two layers. That quantity is called interlayers Delta, and it is represented as a matrix of matrices.
layers_activation_derivative | Activation derivatives of all layers in the multilayer perceptron | |
layers_activation_second_derivative | Activation second derivatives of all layers in the multilayer perceptron | |
interlayers_combination_combination_Jacobian_form | Matrix of matrices containing the partial derivatives of all layers combinations with respect to all layers combinations. | |
output_objective_gradient | Gradient vector of the outputs objective function. | |
output_objective_Hessian | Hessian matrix of the outputs objective function. | |
layers_delta | Vector of vectors containing the partial derivatives of the outputs objective function with respect to the combinations of all layers. |
Definition at line 1001 of file performance_term.cpp.
Vector< double > OpenNN::PerformanceTerm::calculate_point_gradient | ( | const Vector< double > & | inputs, | |
const Vector< Vector< double > > & | layers_activation, | |||
const Vector< Vector< double > > & | layers_delta | |||
) | const |
This method returns the gradient of the performance term function at some input point.
inputs | Input vector. | |
layers_activation | Activations of all layers in the multilayer perceptron | |
layers_delta | Vector of vectors containing the partial derivatives of the outputs objective function with respect to all the combinations of all layers. |
Definition at line 749 of file performance_term.cpp.
Vector< double > OpenNN::PerformanceTerm::calculate_point_gradient | ( | const Vector< Matrix< double > > & | layers_combination_parameters_Jacobian, | |
const Vector< Vector< double > > & | layers_delta | |||
) | const |
This method returns the gradient of the performance term function at some input point.
layers_combination_parameters_Jacobian | ||
layers_delta |
Definition at line 906 of file performance_term.cpp.
Matrix< double > OpenNN::PerformanceTerm::calculate_point_Hessian | ( | const Vector< Vector< double > > & | layers_activation_derivative, | |
const Vector< Vector< Vector< double > > > & | perceptrons_combination_parameters_gradient, | |||
const Matrix< Matrix< double > > & | interlayers_combination_combination_Jacobian, | |||
const Vector< Vector< double > > & | layers_delta, | |||
const Matrix< Matrix< double > > & | interlayers_Delta | |||
) | const |
This method returns the Hessian of the performance term at some input.
layers_activation_derivative | ||
perceptrons_combination_parameters_gradient | ||
interlayers_combination_combination_Jacobian | ||
layers_delta | ||
interlayers_Delta |
Definition at line 1130 of file performance_term.cpp.
virtual double OpenNN::PerformanceTerm::calculate_evaluation | ( | void | ) | const [pure virtual] |
This method returns the evaluation value of the performance term.
Implemented in OpenNN::CrossEntropyError, OpenNN::FinalSolutionsError, OpenNN::IndependentParametersError, OpenNN::InverseSumSquaredError, OpenNN::MeanSquaredError, OpenNN::MinkowskiError, OpenNN::NeuralParametersNorm, OpenNN::NormalizedSquaredError, OpenNN::OutputsIntegrals, OpenNN::RootMeanSquaredError, OpenNN::SolutionsError, and OpenNN::SumSquaredError.
virtual double OpenNN::PerformanceTerm::calculate_evaluation | ( | const Vector< double > & | ) | const [inline, virtual] |
This method returns the default evaluation of a performance term for a given set of neural network parameters.
Reimplemented in OpenNN::CrossEntropyError, OpenNN::FinalSolutionsError, OpenNN::IndependentParametersError, OpenNN::InverseSumSquaredError, OpenNN::MeanSquaredError, OpenNN::MinkowskiError, OpenNN::NeuralParametersNorm, OpenNN::NormalizedSquaredError, OpenNN::OutputsIntegrals, OpenNN::RootMeanSquaredError, OpenNN::SolutionsError, and OpenNN::SumSquaredError.
Definition at line 251 of file performance_term.h.
virtual double OpenNN::PerformanceTerm::calculate_generalization_evaluation | ( | void | ) | const [inline, virtual] |
This method returns an evaluation of the performance term for generalization purposes.
Reimplemented in OpenNN::CrossEntropyError, OpenNN::InverseSumSquaredError, OpenNN::MeanSquaredError, OpenNN::MinkowskiError, OpenNN::NormalizedSquaredError, OpenNN::RootMeanSquaredError, and OpenNN::SumSquaredError.
Definition at line 258 of file performance_term.h.
Vector< double > OpenNN::PerformanceTerm::calculate_gradient | ( | void | ) | const [virtual] |
This method returns the objective function gradient vector for a neural network.
This method returns the default gradient vector of the objective term in the performance function definition.
Reimplemented in OpenNN::CrossEntropyError, OpenNN::IndependentParametersError, OpenNN::MeanSquaredError, OpenNN::MinkowskiError, OpenNN::NeuralParametersNorm, OpenNN::NormalizedSquaredError, OpenNN::OutputsIntegrals, OpenNN::RootMeanSquaredError, and OpenNN::SumSquaredError.
Definition at line 1244 of file performance_term.cpp.
Matrix< double > OpenNN::PerformanceTerm::calculate_Hessian | ( | void | ) | const [virtual] |
This method returns the objective function Hessian matrix for a neural network.
Reimplemented in OpenNN::CrossEntropyError, OpenNN::IndependentParametersError, OpenNN::MeanSquaredError, OpenNN::MinkowskiError, OpenNN::NeuralParametersNorm, OpenNN::NormalizedSquaredError, OpenNN::OutputsIntegrals, OpenNN::RootMeanSquaredError, and OpenNN::SumSquaredError.
Definition at line 1281 of file performance_term.cpp.
Vector< double > OpenNN::PerformanceTerm::calculate_evaluation_terms | ( | void | ) | const [virtual] |
This method returns the evaluation of all the subterms composing the performance term.
Reimplemented in OpenNN::MeanSquaredError, OpenNN::NormalizedSquaredError, and OpenNN::SumSquaredError.
Definition at line 1301 of file performance_term.cpp.
Vector< double > OpenNN::PerformanceTerm::calculate_evaluation_terms | ( | const Vector< double > & | ) | const [virtual] |
This method returns the evaluation of all the subterms composing the performance term.
Reimplemented in OpenNN::MeanSquaredError, OpenNN::NormalizedSquaredError, and OpenNN::SumSquaredError.
Definition at line 1313 of file performance_term.cpp.
Matrix< double > OpenNN::PerformanceTerm::calculate_Jacobian_terms | ( | void | ) | const [virtual] |
This method returns the Jacobian matrix of the subterms composing the performance term.
Reimplemented in OpenNN::MeanSquaredError, OpenNN::NormalizedSquaredError, and OpenNN::SumSquaredError.
Definition at line 1325 of file performance_term.cpp.
PerformanceTerm::FirstOrderEvaluationTerms OpenNN::PerformanceTerm::calculate_first_order_evaluation_terms | ( | void | ) | const [virtual] |
This method returns the evaluation of all the subterms composing the performance term.
Reimplemented in OpenNN::SumSquaredError.
Definition at line 1337 of file performance_term.cpp.
std::string OpenNN::PerformanceTerm::write_performance_term_type | ( | void | ) | const [virtual] |
This method returns a string with the default type of performance term, "USER_PERFORMANCE_TERM".
Reimplemented in OpenNN::CrossEntropyError, OpenNN::FinalSolutionsError, OpenNN::IndependentParametersError, OpenNN::InverseSumSquaredError, OpenNN::MeanSquaredError, OpenNN::MinkowskiError, OpenNN::NeuralParametersNorm, OpenNN::NormalizedSquaredError, OpenNN::OutputsIntegrals, OpenNN::RootMeanSquaredError, OpenNN::SolutionsError, and OpenNN::SumSquaredError.
Definition at line 1349 of file performance_term.cpp.
std::string OpenNN::PerformanceTerm::write_information | ( | void | ) | const [virtual] |
This method returns a string with the default information of the performance term. It will be used by the training strategy to monitor the training process. By default this information is empty.
Reimplemented in OpenNN::FinalSolutionsError, OpenNN::IndependentParametersError, OpenNN::NeuralParametersNorm, and OpenNN::SolutionsError.
Definition at line 1361 of file performance_term.cpp.
std::string OpenNN::PerformanceTerm::to_string | ( | void | ) | const [virtual] |
This method returns the default string representation of a performance term.
Definition at line 1371 of file performance_term.cpp.
TiXmlElement * OpenNN::PerformanceTerm::to_XML | ( | void | ) | const [virtual] |
This method serializes a default performance term object into a XML element of the TinyXML library. See the OpenNN manual for more information about the format of this element.
Reimplemented in OpenNN::CrossEntropyError, OpenNN::FinalSolutionsError, OpenNN::IndependentParametersError, OpenNN::InverseSumSquaredError, OpenNN::MeanSquaredError, OpenNN::MinkowskiError, OpenNN::NeuralParametersNorm, OpenNN::NormalizedSquaredError, OpenNN::OutputsIntegrals, OpenNN::RootMeanSquaredError, OpenNN::SolutionsError, and OpenNN::SumSquaredError.
Definition at line 1387 of file performance_term.cpp.
void OpenNN::PerformanceTerm::from_XML | ( | TiXmlElement * | objective_term_element | ) | [virtual] |
This method loads a default performance term from a XML element.
objective_term_element | Tiny XML element containing the performance term members. |
Reimplemented in OpenNN::CrossEntropyError, OpenNN::FinalSolutionsError, OpenNN::IndependentParametersError, OpenNN::InverseSumSquaredError, OpenNN::MinkowskiError, OpenNN::NeuralParametersNorm, OpenNN::NormalizedSquaredError, OpenNN::OutputsIntegrals, OpenNN::RootMeanSquaredError, OpenNN::SolutionsError, and OpenNN::SumSquaredError.
Definition at line 1405 of file performance_term.cpp.
unsigned int OpenNN::PerformanceTerm::calculate_Kronecker_delta | ( | const unsigned int & | a, | |
const unsigned int & | b | |||
) | const |
This method returns the Knronecker delta of two integers a and b, which equals 1 if they are equal and 0 otherwise.
a | First integer. | |
b | Second integer. |
Definition at line 1440 of file performance_term.cpp.
DataSet* OpenNN::PerformanceTerm::data_set_pointer [protected] |
bool OpenNN::PerformanceTerm::display [protected] |