#include <independent_parameters_error.h>
Definition at line 32 of file independent_parameters_error.h.
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.
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.
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] |
IndependentParametersError & OpenNN::IndependentParametersError::operator= | ( | const IndependentParametersError & | other_independent_parameters_error | ) |
bool OpenNN::IndependentParametersError::operator== | ( | const IndependentParametersError & | other_independent_parameters_error | ) | const |
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.
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.
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.
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.
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.
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.
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:
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] |
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.
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.
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.
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.