#include <MeanSquaredError.h>
Definition at line 29 of file MeanSquaredError.h.
Flood::MeanSquaredError::MeanSquaredError | ( | void | ) | [explicit] |
Default constructor. It creates a mean squared error objective functional object not associated to any multilayer perceptron and not measured on any input-target data set. It also initializes all the rest of class members to their default values.
Definition at line 37 of file MeanSquaredError.cpp.
Flood::MeanSquaredError::MeanSquaredError | ( | MultilayerPerceptron * | new_multilayer_perceptron_pointer | ) | [explicit] |
Multilayer perceptron constructor. It creates a mean squared error objective functional object associated to a multilayer perceptron object but not measured on any input-target data set. It also initializes all the rest of class members to their default values.
new_multilayer_perceptron_pointer | Pointer to a multilayer perceptron object. |
Definition at line 50 of file MeanSquaredError.cpp.
Flood::MeanSquaredError::MeanSquaredError | ( | InputTargetDataSet * | new_input_target_data_set_pointer | ) | [explicit] |
Multilayer perceptron constructor. It creates a mean squared error objective functional object not associated to any multilayer perceptron but to be measured on an input-target data set object. It also initializes all the rest of class members to their default values.
new_input_target_data_set_pointer | Pointer to an input-target data set object. |
Definition at line 64 of file MeanSquaredError.cpp.
Flood::MeanSquaredError::MeanSquaredError | ( | MultilayerPerceptron * | new_multilayer_perceptron_pointer, | |
InputTargetDataSet * | new_input_target_data_set_pointer | |||
) | [explicit] |
General constructor. It creates a mean squared error objective functional object associated to a multilayer perceptron and measured on an input-target data set. It also initializes all the rest of class members to their default values.
new_multilayer_perceptron_pointer | Pointer to a multilayer perceptron object. | |
new_input_target_data_set_pointer | Pointer to an input-target data set object. |
Definition at line 79 of file MeanSquaredError.cpp.
Flood::MeanSquaredError::~MeanSquaredError | ( | void | ) | [virtual] |
Vector< Vector< double > > Flood::MeanSquaredError::calculate_hidden_errors | ( | const Vector< Vector< double > > & | forward_propagation_derivative, | |
const Vector< double > & | output_errors | |||
) |
This method returns the hidden errors to be used in the back-propagation algorithm for calculating the objective gradient.
forward_propagation_derivative | Forward propagation derivative. | |
output_errors | Output errors. |
Definition at line 614 of file MeanSquaredError.cpp.
Vector< double > Flood::MeanSquaredError::calculate_hidden_layers_error_gradient | ( | const Vector< double > & | input, | |
const Vector< Vector< double > > & | forward_propagation_derivative, | |||
const Vector< Vector< double > > & | hidden_errors | |||
) |
This method returns the hidden layers error gradient to be used in the back-propagation algorithm for calculating the objective gradient.
input | Input values. | |
forward_propagation_derivative | Forward propagation derivative. | |
hidden_errors | Hidden errors. |
Definition at line 749 of file MeanSquaredError.cpp.
Matrix< double > Flood::MeanSquaredError::calculate_Jacobian | ( | void | ) |
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 neural parameters.
Definition at line 952 of file MeanSquaredError.cpp.
double Flood::MeanSquaredError::calculate_objective | ( | void | ) | [virtual] |
This method returns the objective value of a multilayer perceptron according to the mean squared error on an input-target data set.
Implements Flood::ObjectiveFunctional.
Definition at line 171 of file MeanSquaredError.cpp.
Vector< double > Flood::MeanSquaredError::calculate_objective_gradient | ( | void | ) | [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 neural parameters.
Reimplemented from Flood::ObjectiveFunctional.
Definition at line 356 of file MeanSquaredError.cpp.
Vector< double > Flood::MeanSquaredError::calculate_output_errors | ( | const Vector< Vector< double > > & | forward_propagation_derivative, | |
const Vector< double > & | target | |||
) |
This method returns the output errors to be used in the back-propagation algorithm for calculating the objective gradient.
forward_propagation_derivative | Forward propagation derivative. | |
target | Target values. |
Definition at line 449 of file MeanSquaredError.cpp.
Vector< double > Flood::MeanSquaredError::calculate_output_layer_error_gradient | ( | const Vector< Vector< double > > & | forward_propagation_derivative, | |
const Vector< double > & | output_errors | |||
) |
This method returns the output layers error gradient to be used in the back-propagation algorithm for calculating the objective gradient.
forward_propagation_derivative | Forward propagation derivative. | |
output_errors | Output errors. |
Definition at line 872 of file MeanSquaredError.cpp.
double Flood::MeanSquaredError::calculate_validation_error | ( | void | ) | [virtual] |
This method returns the mean squared error of the multilayer perceptron measured on the validation instances of the input-target data set.
Reimplemented from Flood::ObjectiveFunctional.
Definition at line 268 of file MeanSquaredError.cpp.
InputTargetDataSet* Flood::MeanSquaredError::get_input_target_data_set_pointer | ( | void | ) | [inline] |
This method returns a pointer to the input-target data set object on which the objective functional is measured.
Definition at line 62 of file MeanSquaredError.h.
void Flood::MeanSquaredError::set | ( | MultilayerPerceptron * | new_multilayer_perceptron_pointer, | |
InputTargetDataSet * | new_input_target_data_set_pointer | |||
) |
This method sets new multilayer perceptron and input-target data set pointers. It also initializes all the rest of class members to their default values.
new_multilayer_perceptron_pointer | Pointer to a multilayer perceptron object. | |
new_input_target_data_set_pointer | Pointer to an input-target data set object. |
Definition at line 147 of file MeanSquaredError.cpp.
void Flood::MeanSquaredError::set | ( | InputTargetDataSet * | new_input_target_data_set_pointer | ) |
This method sets the multilayer perceptron pointer to null, and sets a new input-target data set pointer. It also initializes all the rest of class members to their default values.
new_input_target_data_set_pointer | Pointer to an input-target data set object. |
Definition at line 132 of file MeanSquaredError.cpp.
void Flood::MeanSquaredError::set | ( | MultilayerPerceptron * | new_multilayer_perceptron_pointer | ) |
This method sets a new multilayer perceptron pointer, and sets the input-target data set pointer to NULL. It also initializes all the rest of class members to their default values.
new_multilayer_perceptron_pointer | Pointer to a multilayer perceptron object. |
Definition at line 118 of file MeanSquaredError.cpp.
void Flood::MeanSquaredError::set | ( | void | ) |
This method sets the multilayer perceptron and input-target data set object pointers to NULL. It also initializes all the rest of class members to their default values.
Definition at line 104 of file MeanSquaredError.cpp.
void Flood::MeanSquaredError::set_input_target_data_set_pointer | ( | InputTargetDataSet * | new_input_target_data_set_pointer | ) |
This method sets a pointer to an input-data set object on which the objective functional is to be measured.
new_input_target_data_set_pointer | Pointer to an input-target data set object. |
Definition at line 160 of file MeanSquaredError.cpp.