OpenNN
2.2
Open Neural Networks Library
|
#include <independent_parameters_error.h>
Private Attributes | |
Vector< double > | target_independent_parameters |
Vector< double > | independent_parameters_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 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 43 of file independent_parameters_error.h.
|
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 28 of file independent_parameters_error.cpp.
|
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.
new_neural_network_pointer | Pointer to a neural network object. |
Definition at line 44 of file independent_parameters_error.cpp.
|
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 document.
independent_parameters_error_document | TinyXML document of a independent parameters values object. |
Definition at line 60 of file independent_parameters_error.cpp.
|
virtual |
Returns the performance term gradient.
Returns the default gradient vector of the performance term. It uses numerical differentiation.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 406 of file independent_parameters_error.cpp.
|
virtual |
Returns the performance term Hessian.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 436 of file independent_parameters_error.cpp.
|
virtual |
Implements OpenNN::PerformanceTerm.
Definition at line 362 of file independent_parameters_error.cpp.
|
virtual |
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 257 of file independent_parameters_error.cpp.
|
virtual |
Loads a default performance term from a XML document.
document | TinyXML document containing the performance term members. |
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 563 of file independent_parameters_error.cpp.
const double & OpenNN::IndependentParametersError::get_independent_parameter_error_weight | ( | const size_t & | i | ) | const |
Returns the weight for a singel error between an independent parameters and its target value.
i | Index of independent parameter parameter. |
Definition at line 165 of file independent_parameters_error.cpp.
const double & OpenNN::IndependentParametersError::get_target_independent_parameter | ( | const size_t & | i | ) | const |
Returns the desired value of a single independent parameter.
i | Index of independent parameter. |
Definition at line 144 of file independent_parameters_error.cpp.
|
virtual |
Sets the default values for this object:
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 226 of file independent_parameters_error.cpp.
void OpenNN::IndependentParametersError::set_independent_parameter_error_weight | ( | const size_t & | i, |
const double & | new_independent_parameter_error_weight | ||
) |
Sets a new weight for the error between a single independent parameter and its target value.
i | Index of independent parameter. |
new_independent_parameter_error_weight | Weight value. |
Definition at line 211 of file independent_parameters_error.cpp.
void OpenNN::IndependentParametersError::set_independent_parameters_errors_weights | ( | const Vector< double > & | new_independent_parameters_errors_weights | ) |
Sets new weights for each error between the actual independent parameters and their target values.
new_independent_parameters_errors_weights | Vector of weights, with size the number of independent parameters. |
Definition at line 199 of file independent_parameters_error.cpp.
void OpenNN::IndependentParametersError::set_target_independent_parameter | ( | const size_t & | i, |
const double & | new_target_independent_parameter | ||
) |
Sets the desired value of a single independent parameter.
i | Index of independent parameter. |
new_target_independent_parameter | Desired value for that parameter. |
Definition at line 188 of file independent_parameters_error.cpp.
void OpenNN::IndependentParametersError::set_target_independent_parameters | ( | const Vector< double > & | new_target_independent_parameters | ) |
Sets new desired values for the independent parameters.
new_target_independent_parameters | Vector of desired values for the independent parameters. |
Definition at line 176 of file independent_parameters_error.cpp.
|
virtual |
Returns a representation of the independent parameters error object, in XML format.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 495 of file independent_parameters_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 480 of file independent_parameters_error.cpp.