This class represents the cross entropy error term, used for predicting probabilities. More...
#include <cross_entropy_error.h>
Additional Inherited Members | |
![]() | |
enum class | RegularizationMethod { L1 , L2 , NoRegularization } |
Enumeration of available regularization methods. More... | |
![]() | |
NonBlockingThreadPool * | non_blocking_thread_pool = nullptr |
ThreadPoolDevice * | thread_pool_device = nullptr |
NeuralNetwork * | neural_network_pointer = nullptr |
Pointer to a neural network object. More... | |
DataSet * | data_set_pointer = nullptr |
Pointer to a data set object. More... | |
RegularizationMethod | regularization_method = RegularizationMethod::L2 |
Pointer to a regularization method object. More... | |
type | regularization_weight = static_cast<type>(0.01) |
Regularization weight value. More... | |
bool | display = true |
Display messages to screen. More... | |
const Eigen::array< IndexPair< Index >, 1 > | AT_B = {IndexPair<Index>(0, 0)} |
const Eigen::array< IndexPair< Index >, 1 > | A_B = {IndexPair<Index>(1, 0)} |
const Eigen::array< IndexPair< Index >, 2 > | SSE = {IndexPair<Index>(0, 0), IndexPair<Index>(1, 1)} |
const Eigen::array< int, 1 > | rows_sum = {Eigen::array<int, 1>({1})} |
This class represents the cross entropy error term, used for predicting probabilities.
This functional is used in classification problems.
Definition at line 32 of file cross_entropy_error.h.
|
explicit |
Default constructor. It creates a default cross entropy error 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 19 of file cross_entropy_error.cpp.
|
explicit |
Neural network and data set constructor. It creates a cross entropy error 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 30 of file cross_entropy_error.cpp.
|
virtual |
Destructor.
Definition at line 38 of file cross_entropy_error.cpp.
void calculate_binary_error | ( | const DataSetBatch & | batch, |
const NeuralNetworkForwardPropagation & | forward_propagation, | ||
LossIndexBackPropagation & | back_propagation | ||
) | const |
Definition at line 83 of file cross_entropy_error.cpp.
void calculate_binary_output_delta | ( | const DataSetBatch & | batch, |
NeuralNetworkForwardPropagation & | forward_propagation, | ||
LossIndexBackPropagation & | back_propagation | ||
) | const |
Definition at line 147 of file cross_entropy_error.cpp.
|
virtual |
Implements LossIndex.
Definition at line 48 of file cross_entropy_error.cpp.
void calculate_multiple_error | ( | const DataSetBatch & | batch, |
const NeuralNetworkForwardPropagation & | forward_propagation, | ||
LossIndexBackPropagation & | back_propagation | ||
) | const |
Definition at line 104 of file cross_entropy_error.cpp.
void calculate_multiple_output_delta | ( | const DataSetBatch & | batch, |
NeuralNetworkForwardPropagation & | forward_propagation, | ||
LossIndexBackPropagation & | back_propagation | ||
) | const |
Definition at line 171 of file cross_entropy_error.cpp.
|
virtual |
Implements LossIndex.
Definition at line 124 of file cross_entropy_error.cpp.
void from_XML | ( | const tinyxml2::XMLDocument & | document | ) |
Deserializes a TinyXML document into this cross entropy object.
document | TinyXML document containing the member data. |
Definition at line 224 of file cross_entropy_error.cpp.
|
virtual |
Returns a string with the name of the cross entropy error loss type, "CROSS_ENTROPY_ERROR".
Reimplemented from LossIndex.
Definition at line 194 of file cross_entropy_error.cpp.
|
virtual |
Returns a string with the name of the cross entropy error loss type in text format.
Reimplemented from LossIndex.
Definition at line 202 of file cross_entropy_error.cpp.
|
virtual |
Serializes the cross entropy error object into a XML document of the TinyXML library without keep the DOM tree in memory. See the OpenNN manual for more information about the format of this document
Reimplemented from LossIndex.
Definition at line 211 of file cross_entropy_error.cpp.