This class represents the Minkowski error term. More...
#include <minkowski_error.h>
Private Attributes | |
type | minkowski_parameter |
Minkowski exponent value. More... | |
Additional Inherited Members | |
Public Types inherited from LossIndex | |
enum class | RegularizationMethod { L1 , L2 , NoRegularization } |
Enumeration of available regularization methods. More... | |
Protected Attributes inherited from LossIndex | |
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 Minkowski error term.
The Minkowski error measures the difference between the outputs of a neural network and the targets in a data set. This error term is used in data modeling problems. It can be more useful when the data set presents outliers.
Definition at line 36 of file minkowski_error.h.
|
explicit |
Default constructor. It creates Minkowski error term 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 18 of file minkowski_error.cpp.
|
explicit |
Neural network and data set constructor. It creates a Minkowski 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 minkowski_error.cpp.
|
virtual |
Destructor. It does not delete any pointer.
Definition at line 40 of file minkowski_error.cpp.
|
virtual |
MinkowskiError::calculate_error.
batch | |
forward_propagation | |
back_propagation |
Implements LossIndex.
Definition at line 98 of file minkowski_error.cpp.
|
virtual |
Implements LossIndex.
Definition at line 113 of file minkowski_error.cpp.
void from_XML | ( | const tinyxml2::XMLDocument & | document | ) |
Loads a Minkowski error object from a XML document.
document | TinyXML document containing the members of the object. |
Definition at line 261 of file minkowski_error.cpp.
|
virtual |
Returns a string with the name of the Minkowski error loss type, "MINKOWSKI_ERROR".
Reimplemented from LossIndex.
Definition at line 216 of file minkowski_error.cpp.
|
virtual |
Returns a string with the name of the Minkowski error loss type in text format.
Reimplemented from LossIndex.
Definition at line 224 of file minkowski_error.cpp.
type get_Minkowski_parameter | ( | ) | const |
Returns the Minkowski exponent value used to calculate the error.
Definition at line 47 of file minkowski_error.cpp.
void set_default | ( | ) |
Sets the default values to a Minkowski error object:
Definition at line 59 of file minkowski_error.cpp.
void set_Minkowski_parameter | ( | const type & | new_Minkowski_parameter | ) |
Sets a new Minkowski exponent value to be used in order to calculate the error. The Minkowski R-value must be comprised between 1 and 2.
new_Minkowski_parameter | Minkowski exponent value. |
Definition at line 71 of file minkowski_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 233 of file minkowski_error.cpp.
|
private |
Minkowski exponent value.
Definition at line 84 of file minkowski_error.h.