#include <mean_squared_error.h>
Definition at line 33 of file mean_squared_error.h.
OpenNN::MeanSquaredError::MeanSquaredError | ( | void | ) | [explicit] |
Default constructor. It creates a mean squared error performance term 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 44 of file mean_squared_error.cpp.
OpenNN::MeanSquaredError::MeanSquaredError | ( | NeuralNetwork * | new_neural_network_pointer | ) | [explicit] |
Neural network constructor. It creates a mean squared error performance term object associated to a neural network object but not measured on any data set object. 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 mean_squared_error.cpp.
OpenNN::MeanSquaredError::MeanSquaredError | ( | DataSet * | new_data_set_pointer | ) | [explicit] |
Data set constructor. It creates a mean squared error performance term not associated to any neural network but to be measured on a given 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 mean_squared_error.cpp.
OpenNN::MeanSquaredError::MeanSquaredError | ( | NeuralNetwork * | new_neural_network_pointer, | |
DataSet * | new_data_set_pointer | |||
) | [explicit] |
Neural network and data set constructor. It creates a mean squared error performance term object 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 86 of file mean_squared_error.cpp.
OpenNN::MeanSquaredError::MeanSquaredError | ( | TiXmlElement * | mean_squared_error_element | ) | [explicit] |
XML constructor. It creates a mean squared error object with all pointers set to NULL. The object members are loaded by means of a XML element. Please be careful with the format of that file, which is specified in the OpenNN manual.
mean_squared_error_element | Tiny XML element with the mean squared error elements. |
Definition at line 100 of file mean_squared_error.cpp.
OpenNN::MeanSquaredError::MeanSquaredError | ( | const MeanSquaredError & | other_mean_squared_error | ) |
Copy constructor. It creates a copy of an existing mean squared error object.
other_mean_squared_error | Mean squared error object to be copied. |
Definition at line 112 of file mean_squared_error.cpp.
OpenNN::MeanSquaredError::~MeanSquaredError | ( | void | ) | [virtual] |
void OpenNN::MeanSquaredError::check | ( | void | ) | const [virtual] |
This method checks that there are a neural network and a data set associated to the mean 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 135 of file mean_squared_error.cpp.
double OpenNN::MeanSquaredError::calculate_evaluation | ( | void | ) | const [virtual] |
This method returns the objective value of a multilayer perceptron according to the mean squared error on a data set.
Implements OpenNN::PerformanceTerm.
Definition at line 224 of file mean_squared_error.cpp.
double OpenNN::MeanSquaredError::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 neural network.
parameters | Vector of a potential parameters for the neural network associated to the performance term. |
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 284 of file mean_squared_error.cpp.
double OpenNN::MeanSquaredError::calculate_generalization_evaluation | ( | void | ) | const [virtual] |
This method returns the mean squared error of the multilayer perceptron measured on the generalization instances of the data set.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 331 of file mean_squared_error.cpp.
Vector< double > OpenNN::MeanSquaredError::calculate_gradient | ( | void | ) | const [virtual] |
This method calculates the objective gradient by means of the back-propagation algorithm, and returns it in a single vector of size the number of multilayer_perceptron_pointer parameters.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 391 of file mean_squared_error.cpp.
Matrix< double > OpenNN::MeanSquaredError::calculate_Hessian | ( | void | ) | const [virtual] |
PerformanceTerm::FirstOrderEvaluation OpenNN::MeanSquaredError::calculate_first_order_evaluation | ( | void | ) | const |
PerformanceTerm::SecondOrderEvaluation OpenNN::MeanSquaredError::calculate_second_order_evaluation | ( | void | ) | const |
Vector< double > OpenNN::MeanSquaredError::calculate_evaluation_terms | ( | void | ) | const [virtual] |
This method returns evaluation vector of the objective terms function for the mean squared error. It uses the error back-propagation method.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 526 of file mean_squared_error.cpp.
Vector< double > OpenNN::MeanSquaredError::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 586 of file mean_squared_error.cpp.
Matrix< double > OpenNN::MeanSquaredError::calculate_Jacobian_terms | ( | void | ) | const [virtual] |
This method returns the Jacobian matrix of the mean squared error function, whose elements are given by the derivatives of the squared errors data set with respect to the multilayer_perceptron_pointer parameters.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 632 of file mean_squared_error.cpp.
MeanSquaredError::FirstOrderEvaluationTerms OpenNN::MeanSquaredError::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 749 of file mean_squared_error.cpp.
std::string OpenNN::MeanSquaredError::write_performance_term_type | ( | void | ) | const [virtual] |
This method returns a string with the name of the mean squared error performance type, "MEAN_SQUARED_ERROR".
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 765 of file mean_squared_error.cpp.
TiXmlElement * OpenNN::MeanSquaredError::to_XML | ( | void | ) | const [virtual] |
This method serializes the mean 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 776 of file mean_squared_error.cpp.