#include <outputs_integrals.h>
Public Member Functions | |
OutputsIntegrals (void) | |
OutputsIntegrals (NeuralNetwork *) | |
OutputsIntegrals (TiXmlElement *) | |
virtual | ~OutputsIntegrals (void) |
const NumericalIntegration & | get_numerical_integration (void) const |
NumericalIntegration * | get_numerical_integration_pointer (void) |
const Vector< double > & | get_outputs_integrals_weights (void) const |
const double & | get_output_integral_weight (const unsigned int &) const |
void | set_numerical_integration (const NumericalIntegration &) |
void | set_outputs_integrals_weights (const Vector< double > &) |
void | set_output_integral_weight (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 |
Vector< double > | calculate_gradient (void) const |
Matrix< double > | calculate_Hessian (void) const |
std::string | write_performance_term_type (void) const |
TiXmlElement * | to_XML (void) const |
void | from_XML (TiXmlElement *) |
Definition at line 32 of file outputs_integrals.h.
OpenNN::OutputsIntegrals::OutputsIntegrals | ( | void | ) | [explicit] |
Default constructor. It creates an outputs integrals performance term not associated to any neural network. It also initializes all the rest of class members to their default values.
Definition at line 43 of file outputs_integrals.cpp.
OpenNN::OutputsIntegrals::OutputsIntegrals | ( | NeuralNetwork * | new_neural_network_pointer | ) | [explicit] |
Neural network constructor. It creates an outputs integrals 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 57 of file outputs_integrals.cpp.
OpenNN::OutputsIntegrals::OutputsIntegrals | ( | TiXmlElement * | outputs_integrals_element | ) | [explicit] |
XML constructor. It creates an outputs integrals performance term not associated to any neural network. The class members are loaded from a XML element.
outputs_integrals_element | Pointer to a Tiny XML element with the object data. |
Definition at line 71 of file outputs_integrals.cpp.
OpenNN::OutputsIntegrals::~OutputsIntegrals | ( | void | ) | [virtual] |
const NumericalIntegration & OpenNN::OutputsIntegrals::get_numerical_integration | ( | void | ) | const |
This method returns a constant reference to the numerical integration object inside the outputs integrals object.
Definition at line 93 of file outputs_integrals.cpp.
NumericalIntegration * OpenNN::OutputsIntegrals::get_numerical_integration_pointer | ( | void | ) |
This method returns a pointer to the numerical integration object inside the outputs integrals object.
Definition at line 103 of file outputs_integrals.cpp.
const Vector< double > & OpenNN::OutputsIntegrals::get_outputs_integrals_weights | ( | void | ) | const |
This method returns the weights for each integral of the neural network outputs.
Definition at line 113 of file outputs_integrals.cpp.
const double & OpenNN::OutputsIntegrals::get_output_integral_weight | ( | const unsigned int & | i | ) | const |
This method returns the weight of a single integral of some neural network output.
i | Index of neural network output. |
Definition at line 124 of file outputs_integrals.cpp.
void OpenNN::OutputsIntegrals::set_numerical_integration | ( | const NumericalIntegration & | new_numerical_integration | ) |
This method sets a new numerical integration object inside the outputs integral object.
new_numerical_integration | Numerical integration object. |
Definition at line 135 of file outputs_integrals.cpp.
void OpenNN::OutputsIntegrals::set_outputs_integrals_weights | ( | const Vector< double > & | new_outputs_integrals_weights | ) |
This method sets new weights for each integral of the neural network outputs.
new_outputs_integrals_weights | Weight values. |
Definition at line 146 of file outputs_integrals.cpp.
void OpenNN::OutputsIntegrals::set_output_integral_weight | ( | const unsigned int & | i, | |
const double & | new_output_integral_weight | |||
) |
This method sets a new weight for a single integral of the neural network outputs.
i | Index of output. | |
new_output_integral_weight | Weight value. |
Definition at line 158 of file outputs_integrals.cpp.
void OpenNN::OutputsIntegrals::set_default | ( | void | ) | [virtual] |
This method sets the default values for the outputs integrals object:
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 172 of file outputs_integrals.cpp.
void OpenNN::OutputsIntegrals::check | ( | void | ) | const [virtual] |
This method checks that there are a neural network and a mathematical model associated to the outputs integrals performance term, and that there is a multilayer perceptron in the neural network. It also checks that the number of inputs in the neural network is 1. If some of the above conditions is not hold, the method throws an exception.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 201 of file outputs_integrals.cpp.
double OpenNN::OutputsIntegrals::calculate_evaluation | ( | void | ) | const [virtual] |
This method returns the objective value of a multilayer perceptron according to the sum squared error on a data set.
Implements OpenNN::PerformanceTerm.
Definition at line 255 of file outputs_integrals.cpp.
double OpenNN::OutputsIntegrals::calculate_evaluation | ( | const Vector< double > & | ) | const [virtual] |
This method returns which would be the evaluation of a neural network for an hypothetical vector of parameters. It does not set that vector of parameters to the neural network.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 300 of file outputs_integrals.cpp.
Vector< double > OpenNN::OutputsIntegrals::calculate_gradient | ( | void | ) | const [virtual] |
This method calculates the objective gradient by means of the back-propagation algorithm, and returns it in a single vector of size the number of multilayer_perceptron_pointer parameters.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 356 of file outputs_integrals.cpp.
Matrix< double > OpenNN::OutputsIntegrals::calculate_Hessian | ( | void | ) | const [virtual] |
This method calculates the objective Hessian by means of the back-propagation algorithm, and returns it in a single symmetric matrix of size the number of multilayer_perceptron_pointer parameters.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 378 of file outputs_integrals.cpp.
std::string OpenNN::OutputsIntegrals::write_performance_term_type | ( | void | ) | const [virtual] |
This method returns a string with the name of the outputs integrals performance type, "OUTPUTS_INTEGRALS".
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 398 of file outputs_integrals.cpp.
TiXmlElement * OpenNN::OutputsIntegrals::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 408 of file outputs_integrals.cpp.
void OpenNN::OutputsIntegrals::from_XML | ( | TiXmlElement * | outputs_integrals_element | ) | [virtual] |
This method loads a sum squared error object from a XML element.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 458 of file outputs_integrals.cpp.