Flood::SumSquaredError Class Reference

#include <SumSquaredError.h>

Inheritance diagram for Flood::SumSquaredError:

Flood::ObjectiveFunctional

List of all members.

Public Member Functions

 SumSquaredError (void)
 SumSquaredError (MultilayerPerceptron *)
 SumSquaredError (InputTargetDataSet *)
 SumSquaredError (MultilayerPerceptron *, InputTargetDataSet *)
virtual ~SumSquaredError (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_squared_errors (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)
Matrix< double > calculate_Jacobian_numerical_differentiation (void)
Matrix< double > calculate_Jacobian_forward_differences (void)
Matrix< double > calculate_Jacobian_central_differences (void)
double calculate_validation_error (void)


Detailed Description

This class represents the sum squared error objective functional of a multilayer perceptron. This objective functional is used in data modeling problems, such as function regression, pattern recognition or time series prediction.

Definition at line 29 of file SumSquaredError.h.


Constructor & Destructor Documentation

Flood::SumSquaredError::SumSquaredError ( void   )  [explicit]

Default constructor. It creates a sum 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 SumSquaredError.cpp.

Flood::SumSquaredError::SumSquaredError ( MultilayerPerceptron new_multilayer_perceptron_pointer  )  [explicit]

Multilayer perceptron constructor. It creates a sum 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 SumSquaredError.cpp.

Flood::SumSquaredError::SumSquaredError ( InputTargetDataSet new_input_target_data_set_pointer  )  [explicit]

Multilayer perceptron constructor. It creates a sum 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 SumSquaredError.cpp.

Flood::SumSquaredError::SumSquaredError ( MultilayerPerceptron new_multilayer_perceptron_pointer,
InputTargetDataSet new_input_target_data_set_pointer 
) [explicit]

General constructor. It creates a sum 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 SumSquaredError.cpp.

Flood::SumSquaredError::~SumSquaredError ( void   )  [virtual]

Destructor.

Definition at line 90 of file SumSquaredError.cpp.


Member Function Documentation

Vector< Vector< double > > Flood::SumSquaredError::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 603 of file SumSquaredError.cpp.

Vector< double > Flood::SumSquaredError::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 738 of file SumSquaredError.cpp.

Matrix< double > Flood::SumSquaredError::calculate_Jacobian ( void   ) 

This method returns the Jacobian matrix of the sum squared error function, whose elements are given by the derivatives of the squared errors data set with respect to the neural parameters. The Jacobian matrix here is computed using a back-propagation algorithm.

Definition at line 940 of file SumSquaredError.cpp.

Matrix< double > Flood::SumSquaredError::calculate_Jacobian_central_differences ( void   ) 

This method returns the Jacobian matrix of the sum squared error function with the central differences method for numerical differentiation.

Definition at line 1152 of file SumSquaredError.cpp.

Matrix< double > Flood::SumSquaredError::calculate_Jacobian_forward_differences ( void   ) 

This method returns the Jacobian matrix of the sum squared error function with the forward differences method for numerical differentiation.

Definition at line 1096 of file SumSquaredError.cpp.

Matrix< double > Flood::SumSquaredError::calculate_Jacobian_numerical_differentiation ( void   ) 

This method returns the Jacobian matrix of the sum squared error function by means of numerical differentiation, acording to the numerical differentiation class member.

Definition at line 1039 of file SumSquaredError.cpp.

double Flood::SumSquaredError::calculate_objective ( void   )  [virtual]

This method returns the objective value of a multilayer perceptron according to the sum squared error on an input-target data set.

Implements Flood::ObjectiveFunctional.

Definition at line 170 of file SumSquaredError.cpp.

Vector< double > Flood::SumSquaredError::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 348 of file SumSquaredError.cpp.

Vector< double > Flood::SumSquaredError::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 441 of file SumSquaredError.cpp.

Vector< double > Flood::SumSquaredError::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 862 of file SumSquaredError.cpp.

Vector< double > Flood::SumSquaredError::calculate_squared_errors ( void   ) 

This method returns the squared errors of the training instances.

Definition at line 1220 of file SumSquaredError.cpp.

double Flood::SumSquaredError::calculate_validation_error ( void   )  [virtual]

This method returns the sum squared error of the multilayer perceptron measured on the validation instances of the input-target data set.

Reimplemented from Flood::ObjectiveFunctional.

Definition at line 267 of file SumSquaredError.cpp.

InputTargetDataSet* Flood::SumSquaredError::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 59 of file SumSquaredError.h.

void Flood::SumSquaredError::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 146 of file SumSquaredError.cpp.

void Flood::SumSquaredError::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 131 of file SumSquaredError.cpp.

void Flood::SumSquaredError::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 117 of file SumSquaredError.cpp.

void Flood::SumSquaredError::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 103 of file SumSquaredError.cpp.

void Flood::SumSquaredError::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 159 of file SumSquaredError.cpp.


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

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