Flood::MeanSquaredError Class Reference

#include <MeanSquaredError.h>

Inheritance diagram for Flood::MeanSquaredError:

Flood::ObjectiveFunctional

List of all members.

Public Member Functions

 MeanSquaredError (void)
 MeanSquaredError (MultilayerPerceptron *)
 MeanSquaredError (InputTargetDataSet *)
 MeanSquaredError (MultilayerPerceptron *, InputTargetDataSet *)
virtual ~MeanSquaredError (void)
InputTargetDataSetget_input_target_data_set_pointer (void)
void set (void)
void set (MultilayerPerceptron *)
void set (InputTargetDataSet *)
void set (MultilayerPerceptron *, InputTargetDataSet *)
void set_input_target_data_set_pointer (InputTargetDataSet *)
double calculate_objective (void)
Vector< double > calculate_output_errors (const Vector< Vector< double > > &, const Vector< double > &)
Vector< Vector< double > > calculate_hidden_errors (const Vector< Vector< double > > &, const Vector< double > &)
Vector< double > calculate_hidden_layers_error_gradient (const Vector< double > &, const Vector< Vector< double > > &, const Vector< Vector< double > > &)
Vector< double > calculate_output_layer_error_gradient (const Vector< Vector< double > > &, const Vector< double > &)
Vector< double > calculate_objective_gradient (void)
Matrix< double > calculate_Jacobian (void)
double calculate_validation_error (void)


Detailed Description

This class represents the mean squared error objective functional of a multilayer perceptron. This objective functional is used in data modeling problems.

Definition at line 29 of file MeanSquaredError.h.


Constructor & Destructor Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
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]

Destructor.

Definition at line 91 of file MeanSquaredError.cpp.


Member Function Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
new_input_target_data_set_pointer Pointer to an input-target data set object.

Definition at line 160 of file MeanSquaredError.cpp.


The documentation for this class was generated from the following files:

Generated on Fri Jul 30 09:51:55 2010 for Flood by  doxygen 1.5.9