#include <solutions_error.h>
Definition at line 34 of file solutions_error.h.
Enumeration of the different methods to compute the errors between the mathematical model solutions and the target solutions.
Definition at line 79 of file solutions_error.h.
OpenNN::SolutionsError::SolutionsError | ( | void | ) | [explicit] |
Default constructor. It creates a 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 44 of file solutions_error.cpp.
OpenNN::SolutionsError::SolutionsError | ( | NeuralNetwork * | new_neural_network_pointer | ) | [explicit] |
Neural network constructor. It creates a solutions error associated to a neural network, but not to a . 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 solutions_error.cpp.
OpenNN::SolutionsError::SolutionsError | ( | MathematicalModel * | new_mathematical_model_pointer | ) | [explicit] |
Mathematical model constructor. It creates solutions error object not associated to any neural network but to be measured on a given mathematical model object. 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 75 of file solutions_error.cpp.
OpenNN::SolutionsError::SolutionsError | ( | NeuralNetwork * | new_neural_network_pointer, | |
MathematicalModel * | new_mathematical_model_pointer | |||
) | [explicit] |
Neural network and mathematical model constructor. It creates a solutions error functional associated to a neural network and measured on a 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 92 of file solutions_error.cpp.
OpenNN::SolutionsError::SolutionsError | ( | TiXmlElement * | solutions_error_element | ) | [explicit] |
xml constructor. It creates a 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 with values taken from a Tiny XML element.
solutions_error_element | XML element containing the class members. |
Definition at line 108 of file solutions_error.cpp.
OpenNN::SolutionsError::SolutionsError | ( | const SolutionsError & | other_solutions_error | ) |
Copy constructor. It creates a copy of an existing solutions error object.
other_solutions_error | Solutions error object to be copied. |
Definition at line 123 of file solutions_error.cpp.
OpenNN::SolutionsError::~SolutionsError | ( | void | ) | [virtual] |
Destructor. This destructor does not delete any object. The numerical differentiation object is deleted by the performance term destructor.
Definition at line 138 of file solutions_error.cpp.
SolutionsError & OpenNN::SolutionsError::operator= | ( | const SolutionsError & | other_solutions_error | ) |
Assignment operator. It assigns to this solutions error object the members from another solutions error object.
other_solutions_error | Solutions error object to be copied. |
Definition at line 151 of file solutions_error.cpp.
bool OpenNN::SolutionsError::operator== | ( | const SolutionsError & | other_solutions_error | ) | const |
Equal to operator. It compares this object to another object, and returns true if both have the same member data, and false otherwise.
Definition at line 176 of file solutions_error.cpp.
const SolutionsError::SolutionsErrorMethod & OpenNN::SolutionsError::get_solutions_error_method | ( | void | ) | const |
This method returns the method for computing the solutions error.
Definition at line 199 of file solutions_error.cpp.
std::string OpenNN::SolutionsError::write_solutions_error_method | ( | void | ) | const |
This method returns a string with the name of the method for computing the solutions error.
Definition at line 209 of file solutions_error.cpp.
const Vector< double > & OpenNN::SolutionsError::get_solutions_errors_weights | ( | void | ) | const |
This method returns the weights for every single solution error, corresponding to a dependent variable.
Definition at line 236 of file solutions_error.cpp.
const double & OpenNN::SolutionsError::get_solution_error_weight | ( | const unsigned int & | i | ) | const |
This method returns the weight for a single solution error, corresponding to a dependent variable.
Definition at line 246 of file solutions_error.cpp.
void OpenNN::SolutionsError::set | ( | const SolutionsError & | other_solutions_error | ) |
This method sets to this object the data from another object of the same class.
other_solutions_error | Solutions error object to be copied. |
Definition at line 257 of file solutions_error.cpp.
void OpenNN::SolutionsError::set_solutions_error_method | ( | const SolutionsErrorMethod & | new_solutions_error_method | ) |
This method sets a new method for calculating the error between the solution of a mathematical model and a target solution.
new_solutions_error_method | Method for evaluating this performance term. |
Definition at line 281 of file solutions_error.cpp.
void OpenNN::SolutionsError::set_solutions_error_method | ( | const std::string & | new_solutions_error_method | ) |
This method sets a new solutions error method from a string with that method's name.
new_solutions_error_method | String with the name of the method. |
Definition at line 292 of file solutions_error.cpp.
void OpenNN::SolutionsError::set_solutions_errors_weights | ( | const Vector< double > & | new_solutions_errors_weights | ) |
This method sets new weights for the solution error of every dependent variable.
new_solutions_errors_weights | Weights for the errors between the dependent variable solutions and the corresponding target solutions. |
Definition at line 320 of file solutions_error.cpp.
void OpenNN::SolutionsError::set_solution_error_weight | ( | const unsigned int & | i, | |
const double & | new_solution_error_weight | |||
) |
This method sets a new weight for the solution error of a single dependent variable.
i | Index of dependent variable. | |
new_solution_error_weight | Weight for the error between the above dependent variable solution and the corresponding target solution. |
Definition at line 332 of file solutions_error.cpp.
void OpenNN::SolutionsError::set_default | ( | void | ) | [virtual] |
This method sets the default values for an object of the solutions error class:
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 347 of file solutions_error.cpp.
Matrix< double > OpenNN::SolutionsError::calculate_target_dependent_variables | ( | const Matrix< double > & | independent_variables | ) | const [virtual] |
This method returns the default target solution matrix.
Definition at line 373 of file solutions_error.cpp.
void OpenNN::SolutionsError::check | ( | void | ) | const [virtual] |
This method checks that:
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 401 of file solutions_error.cpp.
double OpenNN::SolutionsError::calculate_solutions_error_sum | ( | void | ) | const |
This method calculates the solutions error evaluation as the weighted mean squared error between the solutions to the mathematical model and the target solutions.
Definition at line 481 of file solutions_error.cpp.
double OpenNN::SolutionsError::calculate_solutions_error_integral | ( | void | ) | const |
double OpenNN::SolutionsError::calculate_evaluation | ( | void | ) | const [virtual] |
This method returns the objective value of a neural network according to the solutions error on a mathematical model.
Implements OpenNN::PerformanceTerm.
Definition at line 539 of file solutions_error.cpp.
double OpenNN::SolutionsError::calculate_evaluation | ( | const Vector< double > & | parameters | ) | const [virtual] |
This method calculates the solutions error value of the neural network for a given set of parameters.
parameters | Vector of potential neural network parameters. |
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 583 of file solutions_error.cpp.
std::string OpenNN::SolutionsError::write_performance_term_type | ( | void | ) | const [virtual] |
This method returns a string with the name of the solutions error performance type, "SOLUTIONS_ERROR".
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 610 of file solutions_error.cpp.
std::string OpenNN::SolutionsError::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 618 of file solutions_error.cpp.
void OpenNN::SolutionsError::print | ( | void | ) | const [virtual] |
This method prints to the screen the string representation of this solutions error object.
Definition at line 632 of file solutions_error.cpp.
TiXmlElement * OpenNN::SolutionsError::to_XML | ( | void | ) | const [virtual] |
This method returns a representation of the solutions error object, in XML format.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 647 of file solutions_error.cpp.
void OpenNN::SolutionsError::from_XML | ( | TiXmlElement * | solutions_error_element | ) | [virtual] |
This method loads a solutions error object from a XML element.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 713 of file solutions_error.cpp.
Method used to compute the error between the mathematical model solutions and the target solutions.
Definition at line 138 of file solutions_error.h.
Vector<double> OpenNN::SolutionsError::solutions_errors_weights [protected] |
Weights for the different dependent variables errors.
Definition at line 142 of file solutions_error.h.