OpenNN  2.2
Open Neural Networks Library
Public Member Functions | Private Attributes | List of all members
OpenNN::MinkowskiError Class Reference

#include <minkowski_error.h>

Inheritance diagram for OpenNN::MinkowskiError:
OpenNN::PerformanceTerm

Public Member Functions

 MinkowskiError (void)
 
 MinkowskiError (NeuralNetwork *)
 
 MinkowskiError (DataSet *)
 
 MinkowskiError (NeuralNetwork *, DataSet *)
 
 MinkowskiError (const tinyxml2::XMLDocument &)
 
virtual ~MinkowskiError (void)
 
double get_Minkowski_parameter (void) const
 
void set_default (void)
 
void set_Minkowski_parameter (const double &)
 
void check (void) const
 
double calculate_performance (void) const
 
double calculate_performance (const Vector< double > &) const
 
double calculate_generalization_performance (void) const
 
Vector< double > calculate_gradient (void) const
 
Matrix< double > calculate_Hessian (void) const
 
std::string write_performance_term_type (void) const
 
tinyxml2::XMLDocument * to_XML (void) const
 
void from_XML (const tinyxml2::XMLDocument &)
 
- Public Member Functions inherited from OpenNN::PerformanceTerm
 PerformanceTerm (void)
 
 PerformanceTerm (NeuralNetwork *)
 
 PerformanceTerm (DataSet *)
 
 PerformanceTerm (MathematicalModel *)
 
 PerformanceTerm (NeuralNetwork *, DataSet *)
 
 PerformanceTerm (NeuralNetwork *, MathematicalModel *)
 
 PerformanceTerm (NeuralNetwork *, MathematicalModel *, DataSet *)
 
 PerformanceTerm (const tinyxml2::XMLDocument &)
 
 PerformanceTerm (const PerformanceTerm &)
 
virtual ~PerformanceTerm (void)
 
virtual PerformanceTermoperator= (const PerformanceTerm &)
 
virtual bool operator== (const PerformanceTerm &) const
 
NeuralNetworkget_neural_network_pointer (void) const
 
MathematicalModelget_mathemtaical_model_pointer (void) const
 
DataSetget_data_set_pointer (void) const
 
NumericalDifferentiationget_numerical_differentiation_pointer (void) const
 
const bool & get_display (void) const
 
bool has_neural_network (void) const
 
bool has_mathematical_model (void) const
 
bool has_data_set (void) const
 
bool has_numerical_differentiation (void) const
 
virtual void set (void)
 
virtual void set (NeuralNetwork *)
 
virtual void set (DataSet *)
 
virtual void set (MathematicalModel *)
 
virtual void set (NeuralNetwork *, DataSet *)
 
virtual void set (NeuralNetwork *, MathematicalModel *)
 
virtual void set (NeuralNetwork *, MathematicalModel *, DataSet *)
 
void set (const PerformanceTerm &)
 
virtual void set_neural_network_pointer (NeuralNetwork *)
 
virtual void set_mathematical_model_pointer (MathematicalModel *)
 
virtual void set_data_set_pointer (DataSet *)
 
void set_numerical_differentiation_pointer (NumericalDifferentiation *)
 
void set_display (const bool &)
 
void construct_numerical_differentiation (void)
 
void delete_numerical_differentiation_pointer (void)
 
Vector< Vector< double > > calculate_layers_delta (const Vector< Vector< double > > &, const Vector< double > &) const
 
Vector< Vector< double > > calculate_layers_delta (const Vector< Vector< double > > &, const Vector< double > &, const Vector< double > &) const
 
Matrix< Matrix< double > > calculate_interlayers_Delta (const Vector< Vector< double > > &, const Vector< Vector< double > > &, const Matrix< Matrix< double > > &, const Vector< double > &, const Matrix< double > &, const Vector< Vector< double > > &) const
 
Vector< double > calculate_point_gradient (const Vector< double > &, const Vector< Vector< double > > &, const Vector< Vector< double > > &) const
 
Vector< double > calculate_point_gradient (const Vector< Matrix< double > > &, const Vector< Vector< double > > &) const
 
Matrix< double > calculate_point_Hessian (const Vector< Vector< double > > &, const Vector< Vector< Vector< double > > > &, const Matrix< Matrix< double > > &, const Vector< Vector< double > > &, const Matrix< Matrix< double > > &) const
 
virtual Vector< double > calculate_gradient (const Vector< double > &) const
 
virtual Matrix< double > calculate_Hessian (const Vector< double > &) const
 
virtual Vector< double > calculate_terms (void) const
 
virtual Vector< double > calculate_terms (const Vector< double > &) const
 
virtual Matrix< double > calculate_terms_Jacobian (void) const
 
virtual PerformanceTerm::FirstOrderTerms calculate_first_order_terms (void) const
 
virtual std::string write_information (void) const
 
virtual std::string to_string (void) const
 
size_t calculate_Kronecker_delta (const size_t &, const size_t &) const
 

Private Attributes

double Minkowski_parameter
 

Additional Inherited Members

- Protected Attributes inherited from OpenNN::PerformanceTerm
NeuralNetworkneural_network_pointer
 
DataSetdata_set_pointer
 
MathematicalModelmathematical_model_pointer
 
NumericalDifferentiationnumerical_differentiation_pointer
 
bool display
 

Detailed Description

This class represents the Minkowski error performance term. The Minkowski error measures the difference between the outputs of a neural network and the targets in a data set. This performance term is used in data modeling problems. It can be more useful when the data set presents outliers.

Definition at line 42 of file minkowski_error.h.

Constructor & Destructor Documentation

OpenNN::MinkowskiError::MinkowskiError ( void  )
explicit

Default constructor. It creates Minkowski error performance 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 27 of file minkowski_error.cpp.

OpenNN::MinkowskiError::MinkowskiError ( NeuralNetwork new_neural_network_pointer)
explicit

Neural network constructor. It creates a Minkowski 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.

Parameters
new_neural_network_pointerPointer to a neural network object.

Definition at line 40 of file minkowski_error.cpp.

OpenNN::MinkowskiError::MinkowskiError ( DataSet new_data_set_pointer)
explicit

Data set constructor. It creates a Minkowski error performance term not associated to any neural network but to be measured on a data set. It also initializes all the rest of class members to their default values.

Parameters
new_data_set_pointerPointer to a data set object.

Definition at line 54 of file minkowski_error.cpp.

OpenNN::MinkowskiError::MinkowskiError ( NeuralNetwork new_neural_network_pointer,
DataSet new_data_set_pointer 
)
explicit

Neural network and data set constructor. It creates a Minkowski 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.

Parameters
new_neural_network_pointerPointer to a neural network object.
new_data_set_pointerPointer to a data set object.

Definition at line 69 of file minkowski_error.cpp.

OpenNN::MinkowskiError::MinkowskiError ( const tinyxml2::XMLDocument &  mean_squared_error_document)
explicit

XML constructor. It creates a Minkowski error object neither associated to a neural network nor to a data set. The object members are loaded by means of a XML document.

Parameters
mean_squared_error_documentTinyXML document with the Minkowski error elements.

Definition at line 83 of file minkowski_error.cpp.

OpenNN::MinkowskiError::~MinkowskiError ( void  )
virtual

Destructor. It does not delete any pointer.

Definition at line 97 of file minkowski_error.cpp.

Member Function Documentation

double OpenNN::MinkowskiError::calculate_generalization_performance ( void  ) const
virtual

Returns the Minkowski error of the multilayer perceptron measured on the generalization instances of the data set.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 429 of file minkowski_error.cpp.

Vector< double > OpenNN::MinkowskiError::calculate_gradient ( void  ) const
virtual

Returns the Minkowski error gradient of a neural network measured on a data set. It uses the error back-propagation method.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 510 of file minkowski_error.cpp.

Matrix< double > OpenNN::MinkowskiError::calculate_Hessian ( void  ) const
virtual
Todo:

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 639 of file minkowski_error.cpp.

double OpenNN::MinkowskiError::calculate_performance ( const Vector< double > &  parameters) const
virtual

Returns which would be the Minkowski error of for an hypothetical vector of parameters. It does not set that vector of parameters to the neural network.

Parameters
parametersVector of potential parameters for the neural network associated to the Minkowski error.

Implements OpenNN::PerformanceTerm.

Definition at line 332 of file minkowski_error.cpp.

void OpenNN::MinkowskiError::check ( void  ) const
virtual

Checks that there are a neural network and a data set associated to the Minkowski 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. If some of the above conditions is not hold, the method throws an exception.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 163 of file minkowski_error.cpp.

void OpenNN::MinkowskiError::from_XML ( const tinyxml2::XMLDocument &  document)
virtual

Loads a Minkowski error object from a XML document.

Parameters
documentTinyXML document containing the members of the object.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 715 of file minkowski_error.cpp.

void OpenNN::MinkowskiError::set_default ( void  )
virtual

Sets the default values to a Minkowski error object:

  • Minkowski parameter: 1.5.
  • Display: true.

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 122 of file minkowski_error.cpp.

void OpenNN::MinkowskiError::set_Minkowski_parameter ( const double &  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.

Parameters
new_Minkowski_parameterMinkowski exponent value.

Definition at line 136 of file minkowski_error.cpp.

tinyxml2::XMLDocument * OpenNN::MinkowskiError::to_XML ( void  ) const
virtual

Serializes the Minkowski error object into a XML document of the TinyXML library. See the OpenNN manual for more information about the format of this document->

Reimplemented from OpenNN::PerformanceTerm.

Definition at line 670 of file minkowski_error.cpp.


The documentation for this class was generated from the following files: