OpenNN::IndependentParametersError Class Reference

#include <independent_parameters_error.h>

Inheritance diagram for OpenNN::IndependentParametersError:

OpenNN::PerformanceTerm

List of all members.

Public Member Functions

 IndependentParametersError (void)
 IndependentParametersError (NeuralNetwork *)
 IndependentParametersError (TiXmlElement *)
virtual ~IndependentParametersError (void)
IndependentParametersErroroperator= (const IndependentParametersError &)
bool operator== (const IndependentParametersError &) const
const Vector< double > & get_target_independent_parameters (void) const
const double & get_target_independent_parameter (const unsigned int &) const
const Vector< double > & get_independent_parameters_errors_weights (void) const
const double & get_independent_parameter_error_weight (const unsigned int &) const
void set_target_independent_parameters (const Vector< double > &)
void set_target_independent_parameter (const unsigned int &, const double &)
void set_independent_parameters_errors_weights (const Vector< double > &)
void set_independent_parameter_error_weight (const unsigned int &, const double &)
void set_default (void)
void check (void) const
double calculate_evaluation (void) const
double calculate_evaluation (const Vector< double > &) const
Vector< double > calculate_gradient (void) const
Matrix< double > calculate_Hessian (void) const
std::string write_performance_term_type (void) const
std::string write_information (void) const
TiXmlElement * to_XML (void) const
void from_XML (TiXmlElement *)


Detailed Description

This performance term measures the error between a set of independent parameteres and a set of targer parameters. This performance term can be used in optimal control problems. A typical example are those problems with free final time.

Definition at line 32 of file independent_parameters_error.h.


Constructor & Destructor Documentation

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

Default constructor. It creates a independent parameters error performance term with all pointers initialized to NULL. It also initializes all the rest of class members to their default values.

Definition at line 43 of file independent_parameters_error.cpp.

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

Neural network constructor. It creates a independent parameters error performance term associated to a neural network. 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 59 of file independent_parameters_error.cpp.

OpenNN::IndependentParametersError::IndependentParametersError ( TiXmlElement *  independent_parameters_error_element  )  [explicit]

XML constructor. It creates a independent parameters error performance term with all pointers initialized to NULL. It also loads the rest of class members from a XML element.

Parameters:
independent_parameters_error_element Tiny XML element of a independent parameters values object.

Definition at line 75 of file independent_parameters_error.cpp.

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

Destructor.

Definition at line 88 of file independent_parameters_error.cpp.


Member Function Documentation

IndependentParametersError & OpenNN::IndependentParametersError::operator= ( const IndependentParametersError other_independent_parameters_error  ) 

Assignment operator.

Definition at line 99 of file independent_parameters_error.cpp.

bool OpenNN::IndependentParametersError::operator== ( const IndependentParametersError other_independent_parameters_error  )  const

Equal to operator.

Definition at line 123 of file independent_parameters_error.cpp.

const Vector< double > & OpenNN::IndependentParametersError::get_target_independent_parameters ( void   )  const

This method returns the desired values for the independent parameter.

Definition at line 148 of file independent_parameters_error.cpp.

const double & OpenNN::IndependentParametersError::get_target_independent_parameter ( const unsigned int &  i  )  const

This method returns the desired value of a single independent parameter.

Parameters:
i Index of independent parameter.

Definition at line 159 of file independent_parameters_error.cpp.

const Vector< double > & OpenNN::IndependentParametersError::get_independent_parameters_errors_weights ( void   )  const

This method returns the weight for each error between the actual independent parameters and their target values.

Definition at line 169 of file independent_parameters_error.cpp.

const double & OpenNN::IndependentParametersError::get_independent_parameter_error_weight ( const unsigned int &  i  )  const

This method returns the weight for a singel error between an independent parameters and its target value.

Parameters:
i Index of independent parameter parameter.

Definition at line 180 of file independent_parameters_error.cpp.

void OpenNN::IndependentParametersError::set_target_independent_parameters ( const Vector< double > &  new_target_independent_parameters  ) 

This method sets new desired values for the independent parameters.

Parameters:
new_target_independent_parameters Vector of desired values for the independent parameters.

Definition at line 191 of file independent_parameters_error.cpp.

void OpenNN::IndependentParametersError::set_target_independent_parameter ( const unsigned int &  i,
const double &  new_target_independent_parameter 
)

This method sets the desired value of a single independent parameter.

Parameters:
i Index of independent parameter.
new_target_independent_parameter Desired value for that parameter.

Definition at line 203 of file independent_parameters_error.cpp.

void OpenNN::IndependentParametersError::set_independent_parameters_errors_weights ( const Vector< double > &  new_independent_parameters_errors_weights  ) 

This method sets new weights for each error between the actual independent parameters and their target values.

Parameters:
new_independent_parameters_errors_weights Vector of weights, with size the number of independent parameters.

Definition at line 214 of file independent_parameters_error.cpp.

void OpenNN::IndependentParametersError::set_independent_parameter_error_weight ( const unsigned int &  i,
const double &  new_independent_parameter_error_weight 
)

This method sets a new weight for the error between a single independent parameter and its target value.

Parameters:
i Index of independent parameter.
new_independent_parameter_error_weight Weight value.

Definition at line 226 of file independent_parameters_error.cpp.

void OpenNN::IndependentParametersError::set_default ( void   )  [virtual]

This method sets the default values for this object:

  • Target independent parameters: 0 for all parameters.
  • Errors weights: 1 for all errors.
  • Display: True.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 241 of file independent_parameters_error.cpp.

void OpenNN::IndependentParametersError::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 number of independent parameters in the neural network is equal to the number of size of the target independent parameters in the performance term. If some of the above conditions is not hold, the method throws an exception.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 272 of file independent_parameters_error.cpp.

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

This method returns the dot product between the independent parameters vector and its targets vector.

Implements OpenNN::PerformanceTerm.

Definition at line 351 of file independent_parameters_error.cpp.

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

Todo:

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 377 of file independent_parameters_error.cpp.

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

This method returns the objective function gradient vector for a neural network.

This method returns the default gradient vector of the objective term in the performance function definition.

Todo:

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 421 of file independent_parameters_error.cpp.

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

This method returns the objective function Hessian matrix for a neural network.

Todo:

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 451 of file independent_parameters_error.cpp.

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

This method returns a string with the name of the independent parameters error performance type, "INDEPENDENT_PARAMETERS_ERROR".

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 487 of file independent_parameters_error.cpp.

std::string OpenNN::IndependentParametersError::write_information ( void   )  const [virtual]

This method returns a string with the default information of the performance term. It will be used by the training strategy to monitor the training process. By default this information is empty.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 495 of file independent_parameters_error.cpp.

TiXmlElement * OpenNN::IndependentParametersError::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 509 of file independent_parameters_error.cpp.

void OpenNN::IndependentParametersError::from_XML ( TiXmlElement *  objective_term_element  )  [virtual]

This method loads a default performance term from a XML element.

Parameters:
objective_term_element Tiny XML element containing the performance term members.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 575 of file independent_parameters_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