OpenNN::FinalSolutionsError Class Reference

#include <final_solutions_error.h>

Inheritance diagram for OpenNN::FinalSolutionsError:

OpenNN::PerformanceTerm

List of all members.

Public Member Functions

 FinalSolutionsError (void)
 FinalSolutionsError (NeuralNetwork *)
 FinalSolutionsError (MathematicalModel *)
 FinalSolutionsError (NeuralNetwork *, MathematicalModel *)
 FinalSolutionsError (TiXmlElement *)
 FinalSolutionsError (const FinalSolutionsError &)
virtual ~FinalSolutionsError (void)
FinalSolutionsErroroperator= (const FinalSolutionsError &)
bool operator== (const FinalSolutionsError &) const
const Vector< double > & get_final_solutions_errors_weights (void) const
const Vector< double > & get_target_final_solutions (void) const
void set (void)
void set (NeuralNetwork *)
void set (MathematicalModel *)
void set (NeuralNetwork *, MathematicalModel *)
void set (const FinalSolutionsError &)
void set_mathematical_model_pointer (MathematicalModel *)
void set_final_solutions_errors_weights (const Vector< double > &)
void set_final_solution_error_weight (const unsigned int &, const double &)
void set_target_final_solutions (const Vector< double > &)
void set_target_final_solution (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
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 class represents the final solutions error constraints functional. The final solutions error is measured on a mathematical model. This constraints functional often appears in optimal control problems.

Definition at line 36 of file final_solutions_error.h.


Constructor & Destructor Documentation

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

Default constructor. It creates a final solutions error performance term not associated to any neural network and not measured on any mathematical model. It also initializes all the rest of class members to their default values.

Definition at line 43 of file final_solutions_error.cpp.

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

Neural network constructor. It creates a final solutions error performance term associated to a neural network but not measured on any mathematical model. 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 final_solutions_error.cpp.

OpenNN::FinalSolutionsError::FinalSolutionsError ( MathematicalModel new_mathematical_model_pointer  )  [explicit]

Mathematical model constructor. It creates a final solutions error performance term not associated to any neural network but to be measured on a given mathematical model. It also initializes all the rest of class members to their default values.

Parameters:
new_mathematical_model_pointer Pointer to a mathematical model object.

Definition at line 75 of file final_solutions_error.cpp.

OpenNN::FinalSolutionsError::FinalSolutionsError ( NeuralNetwork new_neural_network_pointer,
MathematicalModel new_mathematical_model_pointer 
) [explicit]

Neural network and mathematical model constructor. It creates a final solutions error performance term object associated to a given neural network and to be measured on a given mathematical model. 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_mathematical_model_pointer Pointer to a mathematical model object.

Definition at line 92 of file final_solutions_error.cpp.

OpenNN::FinalSolutionsError::FinalSolutionsError ( TiXmlElement *  final_state_error_element  )  [explicit]

XML constructor. It creates a final solutions error performance term neither associated to a neural network nor to a mathematical model. It also sets the rest of members with values from a XML element.

Parameters:
final_state_error_element Pointer to a TinyXML with the member data.

Definition at line 108 of file final_solutions_error.cpp.

OpenNN::FinalSolutionsError::FinalSolutionsError ( const FinalSolutionsError other_final_solutions_error  ) 

Copy constructor. It creates a copy of an existing final solutions error object.

Parameters:
other_final_solutions_error Final solutions error object to be copied.

Definition at line 125 of file final_solutions_error.cpp.

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

Destructor.

Definition at line 136 of file final_solutions_error.cpp.


Member Function Documentation

FinalSolutionsError & OpenNN::FinalSolutionsError::operator= ( const FinalSolutionsError other_final_solutions_error  ) 

Assignment operator.

Definition at line 147 of file final_solutions_error.cpp.

bool OpenNN::FinalSolutionsError::operator== ( const FinalSolutionsError other_final_solutions_error  )  const

Equal to operator.

Todo:

Definition at line 172 of file final_solutions_error.cpp.

const Vector< double > & OpenNN::FinalSolutionsError::get_final_solutions_errors_weights ( void   )  const

This method returns the weight values for each error in the final solutions.

Definition at line 196 of file final_solutions_error.cpp.

const Vector< double > & OpenNN::FinalSolutionsError::get_target_final_solutions ( void   )  const

This method returns the desired final state of each dependent variable.

Definition at line 206 of file final_solutions_error.cpp.

void OpenNN::FinalSolutionsError::set ( void   )  [virtual]

This method sets the neural network and mathematical model pointers to NULL. It also deletes the numerical differentiation pointer inside this class. Finally it sets the rest of members to their default values.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 218 of file final_solutions_error.cpp.

void OpenNN::FinalSolutionsError::set ( NeuralNetwork  )  [virtual]

Todo:

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 236 of file final_solutions_error.cpp.

void OpenNN::FinalSolutionsError::set ( MathematicalModel  )  [virtual]

Todo:

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 245 of file final_solutions_error.cpp.

void OpenNN::FinalSolutionsError::set ( NeuralNetwork ,
MathematicalModel  
) [virtual]

Todo:

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 254 of file final_solutions_error.cpp.

void OpenNN::FinalSolutionsError::set ( const FinalSolutionsError other_final_solutions_error  ) 

This method sets this final solutions error object with the members from another object of the same class.

Parameters:
other_final_solutions_error Final solutions error object to be copied.

Definition at line 264 of file final_solutions_error.cpp.

void OpenNN::FinalSolutionsError::set_mathematical_model_pointer ( MathematicalModel new_mathematical_model_pointer  )  [virtual]

This method associates this final solutions error object with a given mathematical model object.

Parameters:
new_mathematical_model_pointer Pointer to a mathematical model object.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 290 of file final_solutions_error.cpp.

void OpenNN::FinalSolutionsError::set_final_solutions_errors_weights ( const Vector< double > &  new_final_solutions_errors_weights  ) 

This method sets new weight values for each error in the final solutions.

Parameters:
new_final_solutions_errors_weights Weight values. The size of this vector must be equal to the nuber of dependent variables in the mathematical model.

Definition at line 310 of file final_solutions_error.cpp.

void OpenNN::FinalSolutionsError::set_final_solution_error_weight ( const unsigned int &  i,
const double &  new_final_solution_error_weight 
)

This method sets a new weight value for a single error in the final solutions.

Parameters:
i Index of dependent variable.
new_final_solution_error_weight Weight value for the error of that dependent variable.

Definition at line 322 of file final_solutions_error.cpp.

void OpenNN::FinalSolutionsError::set_target_final_solutions ( const Vector< double > &  new_target_final_solutions  ) 

This method sets the desired final states for each dependent variable.

Parameters:
new_target_final_solutions Desired final values. The size of this vector must be equal to the number of dependent variables in the mathematical model.

Definition at line 333 of file final_solutions_error.cpp.

void OpenNN::FinalSolutionsError::set_target_final_solution ( const unsigned int &  i,
const double &  new_target_final_solution 
)

This method sets the desired final state of a single dependent variable.

Parameters:
i Index of dependent variable.
new_target_final_solution Desired final value of that dependent variable.

Definition at line 345 of file final_solutions_error.cpp.

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

This method sets the default variables of this object.

  • Target final solutions: 0 for all dependent variables.
  • Final solutions errors weights: 1 for all dependent variables.
  • Display: True.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 360 of file final_solutions_error.cpp.

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

This method checks that there are a neural network and a mathematical model associated to the sum squared error, and that the number of dependent variables in the mathematical model is equal to the number of target final solutions 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 387 of file final_solutions_error.cpp.

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

This method returns the evaluation value of the performance term.

Implements OpenNN::PerformanceTerm.

Definition at line 467 of file final_solutions_error.cpp.

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

This method returns the default evaluation of a performance term for a given set of neural network parameters.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 494 of file final_solutions_error.cpp.

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

This method returns a string with the name of the final solutions error performance type, "FINAL_SOLUTIONS_ERROR".

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 540 of file final_solutions_error.cpp.

std::string OpenNN::FinalSolutionsError::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 548 of file final_solutions_error.cpp.

TiXmlElement * OpenNN::FinalSolutionsError::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 576 of file final_solutions_error.cpp.

void OpenNN::FinalSolutionsError::from_XML ( TiXmlElement *  final_solutions_error_element  )  [virtual]

This method loads a final solutions error object from a XML element.

Todo:

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 643 of file final_solutions_error.cpp.


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

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