#include <cross_entropy_error.h>
Public Member Functions | |
CrossEntropyError (void) | |
CrossEntropyError (NeuralNetwork *) | |
CrossEntropyError (DataSet *) | |
CrossEntropyError (NeuralNetwork *, DataSet *) | |
CrossEntropyError (TiXmlElement *) | |
CrossEntropyError (const CrossEntropyError &) | |
virtual | ~CrossEntropyError (void) |
CrossEntropyError & | operator= (const CrossEntropyError &) |
bool | operator== (const CrossEntropyError &) const |
void | check (void) const |
double | calculate_evaluation (void) const |
double | calculate_evaluation (const Vector< double > &) const |
double | calculate_minimum_objective (void) |
double | calculate_generalization_evaluation (void) const |
double | calculate_minimum_generalization_objective (void) |
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 30 of file cross_entropy_error.h.
OpenNN::CrossEntropyError::CrossEntropyError | ( | void | ) | [explicit] |
Default constructor. It creates a default cross entropy error performance term object, which is not associated to any neural network and not measured on any data set. It also initializes all the rest of class members to their default values.
Definition at line 41 of file cross_entropy_error.cpp.
OpenNN::CrossEntropyError::CrossEntropyError | ( | NeuralNetwork * | new_neural_network_pointer | ) | [explicit] |
Neural network constructor. It creates a cross entropy error performance term associated to a neural network but not measured on any data set. 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 53 of file cross_entropy_error.cpp.
OpenNN::CrossEntropyError::CrossEntropyError | ( | DataSet * | new_data_set_pointer | ) | [explicit] |
Data set constructor. It creates a cross entropy error not associated to any neural network but to be measured on a data set object. It also initializes all the rest of class members to their default values.
new_data_set_pointer | Pointer to a data set object. |
Definition at line 66 of file cross_entropy_error.cpp.
OpenNN::CrossEntropyError::CrossEntropyError | ( | NeuralNetwork * | new_neural_network_pointer, | |
DataSet * | new_data_set_pointer | |||
) | [explicit] |
Neural network and data set constructor. It creates a cross entropy error performance term object associated to a neural network and measured on a data set. It also initializes all the rest of class members to their default values:
new_neural_network_pointer,: | Pointer to a neural network object. | |
new_data_set_pointer,: | Pointer to a data set object. |
Definition at line 80 of file cross_entropy_error.cpp.
OpenNN::CrossEntropyError::CrossEntropyError | ( | TiXmlElement * | sum_squared_error_element | ) | [explicit] |
XML constructor. It creates a cross entropy error not associated to any neural network and not measured on any data set. It also sets all the rest of class members from a TinyXML element.
sum_squared_error_element | XML element with the class members. |
Definition at line 93 of file cross_entropy_error.cpp.
OpenNN::CrossEntropyError::CrossEntropyError | ( | const CrossEntropyError & | new_cross_entropy_error | ) |
Copy constructor. It creates a cross entropy error not associated to any neural network and not measured on any data set. It also sets all the rest of class members from another sum squared error object.
new_cross_entropy_error | Object to be copied. |
Definition at line 107 of file cross_entropy_error.cpp.
OpenNN::CrossEntropyError::~CrossEntropyError | ( | void | ) | [virtual] |
CrossEntropyError & OpenNN::CrossEntropyError::operator= | ( | const CrossEntropyError & | other_cross_entropy_error | ) |
Assignment operator.
other_cross_entropy_error | Object to be copied. |
Definition at line 128 of file cross_entropy_error.cpp.
bool OpenNN::CrossEntropyError::operator== | ( | const CrossEntropyError & | other_cross_entropy_error | ) | const |
Equal to operator. If compares this object with another object of the same class, and returns true if they are equal, and false otherwise.
other_cross_entropy_error | Object to be compared with. |
Definition at line 147 of file cross_entropy_error.cpp.
void OpenNN::CrossEntropyError::check | ( | void | ) | const [virtual] |
This method checks that there are a neural network and a data set associated to the cross entropy error, and that the numbers of inputs and outputs in the neural network are equal to the numbers of inputs and targets in the data set.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 171 of file cross_entropy_error.cpp.
double OpenNN::CrossEntropyError::calculate_evaluation | ( | void | ) | const [virtual] |
double OpenNN::CrossEntropyError::calculate_evaluation | ( | const Vector< double > & | ) | const [virtual] |
This method returns which would be the objective of a neural for a given vector of parameters. It does not set that vector of parameters to the neural network.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 363 of file cross_entropy_error.cpp.
double OpenNN::CrossEntropyError::calculate_minimum_objective | ( | void | ) |
This method returns the minimum achieveable cross entropy for the training data.
Definition at line 417 of file cross_entropy_error.cpp.
double OpenNN::CrossEntropyError::calculate_generalization_evaluation | ( | void | ) | const [virtual] |
This method returns the cross entropy error of the neural network measured on the generalization instances of the data set.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 428 of file cross_entropy_error.cpp.
double OpenNN::CrossEntropyError::calculate_minimum_generalization_objective | ( | void | ) |
This method returns the minimum achieveable cross entropy for the generalization data.
Definition at line 488 of file cross_entropy_error.cpp.
Vector< double > OpenNN::CrossEntropyError::calculate_gradient | ( | void | ) | const [virtual] |
This method returns the cross entropy error gradient of a neural network on a data set. It uses the error back-propagation method.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 500 of file cross_entropy_error.cpp.
Matrix< double > OpenNN::CrossEntropyError::calculate_Hessian | ( | void | ) | const [virtual] |
std::string OpenNN::CrossEntropyError::write_performance_term_type | ( | void | ) | const [virtual] |
This method returns a string with the name of the cross entropy error performance type, "CROSS_ENTROPY_ERROR".
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 638 of file cross_entropy_error.cpp.
TiXmlElement * OpenNN::CrossEntropyError::to_XML | ( | void | ) | const [virtual] |
This method serializes the cross entropy error object into a XML element of the TinyXML library. See the OpenNN manual for more information about the format of this element.
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 649 of file cross_entropy_error.cpp.
void OpenNN::CrossEntropyError::from_XML | ( | TiXmlElement * | cross_entropy_error_element | ) | [virtual] |
This method deserializes a TinyXML element into this cross entropy object.
cross_entropy_error_element | Pointer to a XML element containing the member data. |
Reimplemented from OpenNN::PerformanceTerm.
Definition at line 680 of file cross_entropy_error.cpp.