OpenNN::SumSquaredError Class Reference

#include <sum_squared_error.h>

Inheritance diagram for OpenNN::SumSquaredError:

OpenNN::PerformanceTerm

List of all members.

Public Member Functions

 SumSquaredError (void)
 SumSquaredError (NeuralNetwork *)
 SumSquaredError (DataSet *)
 SumSquaredError (NeuralNetwork *, DataSet *)
 SumSquaredError (TiXmlElement *)
 SumSquaredError (const SumSquaredError &)
virtual ~SumSquaredError (void)
void check (void) const
double calculate_evaluation (void) const
double calculate_evaluation (const Vector< double > &) const
double calculate_generalization_evaluation (void) const
Vector< double > calculate_gradient (void) const
Matrix< double > calculate_Hessian (void) const
Vector< double > calculate_evaluation_terms (void) const
Vector< double > calculate_evaluation_terms (const Vector< double > &) const
Matrix< double > calculate_Jacobian_terms (void) const
PerformanceTerm::FirstOrderEvaluationTerms calculate_first_order_evaluation_terms (void) const
Vector< double > calculate_squared_errors (void) const
std::string write_performance_term_type (void) const
TiXmlElement * to_XML (void) const
void from_XML (TiXmlElement *)


Detailed Description

This class represents the sum squared peformance term functional. This is used as the performance term in data modeling problems, such as function regression, pattern recognition or time series prediction.

Definition at line 29 of file sum_squared_error.h.


Constructor & Destructor Documentation

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

Default constructor. It creates a sum 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 43 of file sum_squared_error.cpp.

OpenNN::SumSquaredError::SumSquaredError ( NeuralNetwork new_neural_network_pointer  )  [explicit]

Neural network constructor. It creates a sum squared error performance term associated to a neural network but not measured on any data set. It also initializes all the rest of class members to their default values.

Parameters:
new_neural_network_pointer Pointer to a neural network object.

Definition at line 55 of file sum_squared_error.cpp.

OpenNN::SumSquaredError::SumSquaredError ( DataSet new_data_set_pointer  )  [explicit]

Data set constructor. It creates a sum squared error 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.

Parameters:
new_data_set_pointer Pointer to a data set object.

Definition at line 68 of file sum_squared_error.cpp.

OpenNN::SumSquaredError::SumSquaredError ( NeuralNetwork new_neural_network_pointer,
DataSet new_data_set_pointer 
) [explicit]

Neural network and data set constructor. It creates a sum squared error associated to a neural network and measured on a data set. It also initializes all the rest of class members to their default values.

Parameters:
new_neural_network_pointer Pointer to a neural network object.
new_data_set_pointer Pointer to a data set object.

Definition at line 82 of file sum_squared_error.cpp.

OpenNN::SumSquaredError::SumSquaredError ( TiXmlElement *  sum_squared_error_element  )  [explicit]

XML constructor. It creates a sum 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.

Parameters:
sum_squared_error_element XML element with the class members.

Definition at line 95 of file sum_squared_error.cpp.

OpenNN::SumSquaredError::SumSquaredError ( const SumSquaredError new_sum_squared_error  ) 

Copy constructor. It creates a sum 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 another sum squared error object.

Parameters:
new_sum_squared_error Object to be copied.

Definition at line 109 of file sum_squared_error.cpp.

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

Destructor.

Definition at line 120 of file sum_squared_error.cpp.


Member Function Documentation

void OpenNN::SumSquaredError::check ( void   )  const [virtual]

This method checks that there are a neural network and a data set associated to the sum 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 133 of file sum_squared_error.cpp.

double OpenNN::SumSquaredError::calculate_evaluation ( void   )  const [virtual]

This method returns the evaluation value of a neural network according to the sum squared error on a data set.

Implements OpenNN::PerformanceTerm.

Definition at line 203 of file sum_squared_error.cpp.

double OpenNN::SumSquaredError::calculate_evaluation ( const Vector< double > &  parameters  )  const [virtual]

This method returns which would be the sum squard error evaluation of a neural network for an hypothetical vector of parameters. It does not set that vector of parameters to the neural network.

Parameters:
parameters Vector of a potential parameters for the neural network associated to the performance term.
Todo:

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 262 of file sum_squared_error.cpp.

double OpenNN::SumSquaredError::calculate_generalization_evaluation ( void   )  const [virtual]

This method returns the sum squared error of the neural network measured on the generalization instances of the data set.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 309 of file sum_squared_error.cpp.

Vector< double > OpenNN::SumSquaredError::calculate_gradient ( void   )  const [virtual]

This method calculates the performance term gradient by means of the back-propagation algorithm, and returns it in a single vector of size the number of neural network parameters.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 365 of file sum_squared_error.cpp.

Matrix< double > OpenNN::SumSquaredError::calculate_Hessian ( void   )  const [virtual]

This method calculates the objective Hessian by means of the back-propagation algorithm, and returns it in a single symmetric matrix of size the number of neural network parameters.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 468 of file sum_squared_error.cpp.

Vector< double > OpenNN::SumSquaredError::calculate_evaluation_terms ( void   )  const [virtual]

This method calculates the squared error terms for each instance, and returns it in a vector of size the number training instances.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 574 of file sum_squared_error.cpp.

Vector< double > OpenNN::SumSquaredError::calculate_evaluation_terms ( const Vector< double > &  parameters  )  const [virtual]

This method returns the evaluation terms vector for a hypotetical vector of parameters.

Parameters:
parameters Neural network parameters for which the evaluation terms vector is to be computed.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 627 of file sum_squared_error.cpp.

Matrix< double > OpenNN::SumSquaredError::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 675 of file sum_squared_error.cpp.

PerformanceTerm::FirstOrderEvaluationTerms OpenNN::SumSquaredError::calculate_first_order_evaluation_terms ( void   )  const [virtual]

This method returns the first order evaluation of the terms objective function. This is a structure containing the objective terms vector and the objective terms Jacobian.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 800 of file sum_squared_error.cpp.

Vector< double > OpenNN::SumSquaredError::calculate_squared_errors ( void   )  const

This method returns the squared errors of the training instances.

Definition at line 815 of file sum_squared_error.cpp.

std::string OpenNN::SumSquaredError::write_performance_term_type ( void   )  const [virtual]

This method returns a string with the name of the sum squared error performance type, "SUM_SQUARED_ERROR".

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 871 of file sum_squared_error.cpp.

TiXmlElement * OpenNN::SumSquaredError::to_XML ( void   )  const [virtual]

This method returns a representation of the sum squared error object, in XML format.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 881 of file sum_squared_error.cpp.

void OpenNN::SumSquaredError::from_XML ( TiXmlElement *  sum_squared_error_element  )  [virtual]

This method loads a sum squared error object from a XML element.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 912 of file sum_squared_error.cpp.


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

Generated on Sun Aug 26 11:58:19 2012 for OpenNN by  doxygen 1.5.9