OpenNN
2.2
Open Neural Networks Library
|
#include <final_solutions_error.h>
Private Attributes | |
Vector< double > | target_final_solutions |
Vector< double > | final_solutions_errors_weights |
Additional Inherited Members | |
Protected Attributes inherited from OpenNN::PerformanceTerm | |
NeuralNetwork * | neural_network_pointer |
DataSet * | data_set_pointer |
MathematicalModel * | mathematical_model_pointer |
NumericalDifferentiation * | numerical_differentiation_pointer |
bool | display |
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 43 of file final_solutions_error.h.
|
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 27 of file final_solutions_error.cpp.
|
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.
new_neural_network_pointer | Pointer to a neural network object. |
Definition at line 43 of file final_solutions_error.cpp.
|
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.
new_mathematical_model_pointer | Pointer to a mathematical model object. |
Definition at line 59 of file final_solutions_error.cpp.
|
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.
new_neural_network_pointer | Pointer to a neural network object. |
new_mathematical_model_pointer | Pointer to a mathematical model object. |
Definition at line 76 of file final_solutions_error.cpp.
|
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 document.
final_state_error_document | Pointer to a TinyXML with the member data. |
Definition at line 92 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.
other_final_solutions_error | Final solutions error object to be copied. |
Definition at line 109 of file final_solutions_error.cpp.
|
virtual |
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 389 of file final_solutions_error.cpp.
|
virtual |
Loads a final solutions error object from a XML document.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 612 of file final_solutions_error.cpp.
bool OpenNN::FinalSolutionsError::operator== | ( | const FinalSolutionsError & | other_final_solutions_error | ) | const |
|
virtual |
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 220 of file final_solutions_error.cpp.
|
virtual |
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 238 of file final_solutions_error.cpp.
|
virtual |
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 247 of file final_solutions_error.cpp.
|
virtual |
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 256 of file final_solutions_error.cpp.
|
virtual |
Sets the default variables of this object.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 362 of file final_solutions_error.cpp.
void OpenNN::FinalSolutionsError::set_final_solution_error_weight | ( | const size_t & | i, |
const double & | new_final_solution_error_weight | ||
) |
Sets a new weight value for a single error in the final solutions.
i | Index of dependent variable. |
new_final_solution_error_weight | Weight value for the error of that dependent variable. |
Definition at line 324 of file final_solutions_error.cpp.
void OpenNN::FinalSolutionsError::set_final_solutions_errors_weights | ( | const Vector< double > & | new_final_solutions_errors_weights | ) |
Sets new weight values for each error in the final solutions.
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 312 of file final_solutions_error.cpp.
|
virtual |
Associates this final solutions error object with a given mathematical model object.
new_mathematical_model_pointer | Pointer to a mathematical model object. |
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 292 of file final_solutions_error.cpp.
void OpenNN::FinalSolutionsError::set_target_final_solution | ( | const size_t & | i, |
const double & | new_target_final_solution | ||
) |
Sets the desired final state of a single dependent variable.
i | Index of dependent variable. |
new_target_final_solution | Desired final value of that dependent variable. |
Definition at line 347 of file final_solutions_error.cpp.
void OpenNN::FinalSolutionsError::set_target_final_solutions | ( | const Vector< double > & | new_target_final_solutions | ) |
Sets the desired final states for each dependent variable.
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 335 of file final_solutions_error.cpp.
|
virtual |
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 514 of file final_solutions_error.cpp.
|
private |
Weight value for each error on the final solution. The size of this vector must be equal to the number of dependent variablese in the mathematical model.
Definition at line 142 of file final_solutions_error.h.
|
private |
Desired final values for the dependent variables. The size of this vector must be equal to the number of dependent variablese in the mathematical model.
Definition at line 137 of file final_solutions_error.h.