#include <normalized_squared_error.h>
Definition at line 32 of file normalized_squared_error.h.
OpenNN::NormalizedSquaredError::NormalizedSquaredError | ( | NeuralNetwork * | new_neural_network_pointer, | |
DataSet * | new_data_set_pointer | |||
) | [explicit] |
Neural network and data set constructor. It creates a normalized squared error performance term associated to a neural network and measured on a data set. 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 85 of file normalized_squared_error.cpp.
OpenNN::NormalizedSquaredError::NormalizedSquaredError | ( | NeuralNetwork * | new_neural_network_pointer | ) | [explicit] |
Neural network constructor. It creates a normalized squared error performance term associated to a neural network object but not measured on any data set. 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 57 of file normalized_squared_error.cpp.
OpenNN::NormalizedSquaredError::NormalizedSquaredError | ( | DataSet * | new_data_set_pointer | ) | [explicit] |
Data set constructor. It creates a normalized squared error performance term not associated to any neural network but to be measured on a data set object. 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 71 of file normalized_squared_error.cpp.
OpenNN::NormalizedSquaredError::NormalizedSquaredError | ( | void | ) | [explicit] |
Default constructor. It creates a normalized squared error performance term object not associated to any neural network and not measured on any data set. It also initializes all the rest of class members to their default values.
Definition at line 45 of file normalized_squared_error.cpp.
OpenNN::NormalizedSquaredError::NormalizedSquaredError | ( | TiXmlElement * | normalized_squared_error_element | ) | [explicit] |
XML constructor. It creates a normalized squared error not associated to any neural network and not measured on any data set. It also sets all the rest of class members from a TinyXML element.
normalized_squared_error_element | XML element with the class members. |
Definition at line 98 of file normalized_squared_error.cpp.
OpenNN::NormalizedSquaredError::~NormalizedSquaredError | ( | void | ) | [virtual] |
double OpenNN::NormalizedSquaredError::calculate_normalization_coefficient | ( | const Matrix< double > & | target_data, | |
const Vector< double > & | target_data_mean | |||
) | const |
This method returns the normalization coefficient to be used for the evaluation of the error. This is measured on the training instances of the data set.
Definition at line 120 of file normalized_squared_error.cpp.
void OpenNN::NormalizedSquaredError::check | ( | void | ) | const [virtual] |
This method checks that there are a neural network and a data set associated to the normalized squared error, and that the numbers of inputs and outputs in the neural network are equal to the numbers of inputs and targets in the data set. If some of the above conditions is not hold, the method throws an exception.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 132 of file normalized_squared_error.cpp.
double OpenNN::NormalizedSquaredError::calculate_evaluation | ( | void | ) | const [virtual] |
This method returns the evaluation value of a multilayer perceptron according to the normalized squared error on a data set.
Implements OpenNN::PerformanceTerm.
Definition at line 222 of file normalized_squared_error.cpp.
Vector< double > OpenNN::NormalizedSquaredError::calculate_gradient | ( | void | ) | const [virtual] |
This method returns the normalized squared error function gradient of a multilayer perceptron on a data set. It uses the error back-propagation method.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 421 of file normalized_squared_error.cpp.
Matrix< double > OpenNN::NormalizedSquaredError::calculate_Hessian | ( | void | ) | const [virtual] |
This method returns the normalized squared error function Hessian of a multilayer perceptron on a data set. It uses the error back-propagation method.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 529 of file normalized_squared_error.cpp.
double OpenNN::NormalizedSquaredError::calculate_evaluation | ( | const Vector< double > & | parameters | ) | const [virtual] |
This method returns which would be the objective of a multilayer perceptron for an hypothetical vector of parameters. It does not set that vector of parameters to the multilayer perceptron.
parameters | Vector of a potential parameters for the multilayer perceptron associated to the performance functional. |
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 300 of file normalized_squared_error.cpp.
double OpenNN::NormalizedSquaredError::calculate_generalization_evaluation | ( | void | ) | const [virtual] |
This method returns an evaluation of the performance term for generalization purposes.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 343 of file normalized_squared_error.cpp.
Vector< double > OpenNN::NormalizedSquaredError::calculate_evaluation_terms | ( | void | ) | const [virtual] |
This method returns evaluation vector of the objective terms function for the normalized squared error. It uses the error back-propagation method.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 542 of file normalized_squared_error.cpp.
Vector< double > OpenNN::NormalizedSquaredError::calculate_evaluation_terms | ( | const Vector< double > & | network_parameters | ) | const [virtual] |
This method returns which would be the objective terms evaluation vector of a multilayer perceptron for an hypothetical vector of multilayer_perceptron_pointer parameters. It does not set that vector of parameters to the multilayer perceptron.
network_parameters | Vector of a potential multilayer_perceptron_pointer parameters for the multilayer perceptron associated to the performance functional. |
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 621 of file normalized_squared_error.cpp.
Matrix< double > OpenNN::NormalizedSquaredError::calculate_Jacobian_terms | ( | void | ) | const [virtual] |
This method returns the Jacobian_terms matrix of the sum squared error function, whose elements are given by the derivatives of the squared errors data set with respect to the multilayer_perceptron_pointer parameters. The Jacobian_terms matrix here is computed using a back-propagation algorithm.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 671 of file normalized_squared_error.cpp.
NormalizedSquaredError::FirstOrderEvaluationTerms OpenNN::NormalizedSquaredError::calculate_first_order_evaluation_terms | ( | void | ) |
This method returns a first order objective terms evaluation structure, which contains the values and the Jacobian of the objective terms function.
Definition at line 811 of file normalized_squared_error.cpp.
Vector< double > OpenNN::NormalizedSquaredError::calculate_squared_errors | ( | void | ) | const |
This method returns the squared errors of the training instances.
Definition at line 827 of file normalized_squared_error.cpp.
std::string OpenNN::NormalizedSquaredError::write_performance_term_type | ( | void | ) | const [virtual] |
This method returns a string with the name of the normalized squared error performance type, "NORMALIZED_SQUARED_ERROR".
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 885 of file normalized_squared_error.cpp.
TiXmlElement * OpenNN::NormalizedSquaredError::to_XML | ( | void | ) | const [virtual] |
This method serializes the normalized squared error object into a XML element of the TinyXML library. See the OpenNN manual for more information about the format of this element.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 896 of file normalized_squared_error.cpp.
void OpenNN::NormalizedSquaredError::from_XML | ( | TiXmlElement * | normalized_squared_error_element | ) | [virtual] |
This method loads a root mean squared error object from a XML element.
normalized_squared_error_element | Pointer to a TinyXML element with the object data. |
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 927 of file normalized_squared_error.cpp.