OpenNN  2.2
Open Neural Networks Library
inverse_sum_squared_error.h
1 /****************************************************************************************************************/
2 /* */
3 /* OpenNN: Open Neural Networks Library */
4 /* www.artelnics.com/opennn */
5 /* */
6 /* I N V E R S E S U M S Q U A R E D E R R O R C L A S S H E A D E R */
7 /* */
8 /* Roberto Lopez */
9 /* Artelnics - Making intelligent use of data */
11 /* */
12 /****************************************************************************************************************/
13 
14 #ifndef __INVERSESUMSQUAREDERROR_H__
15 #define __INVERSESUMSQUAREDERROR_H__
16 
17 // System includes
18 
19 #include <string>
20 #include <sstream>
21 #include <iostream>
22 #include <fstream>
23 #include <cmath>
24 
25 // OpenNN includes
26 
27 #include "mathematical_model.h"
28 #include "data_set.h"
29 
30 #include "performance_term.h"
31 
32 namespace OpenNN
33 {
34 
38 
40 {
41 
42 public:
43 
44  // DEFAULT CONSTRUCTOR
45 
46  explicit InverseSumSquaredError(void);
47 
48  // NEURAL NETWORK CONSTRUCTOR
49 
51 
52  // NEURAL NETWORK, MATHEMATICAL MODEL AND DATA SET CONSTRUCTOR
53 
55 
56  // XML CONSTRUCTOR
57 
58  explicit InverseSumSquaredError(const tinyxml2::XMLDocument&);
59 
60  // DESTRUCTOR
61 
62  virtual ~InverseSumSquaredError(void);
63 
64  // ENUMERATIONS
65 
67 
68  enum UnknownsMethod{LookUpTable, IndependentParametersValues};
69 
70  // STRUCTURES
71 
72  // METHODS
73 
74  // Get methods
75 
76  const UnknownsMethod& get_unknowns_method(void) const;
77  std::string write_unknowns_method(void) const;
78 
79  // Set methods
80 
82  void set_unknowns_method(const std::string&);
83 
84  void set_default(void);
85 
86  // Checking methods
87 
88  void check(void) const;
89 
90  // Objective methods
91 
92  double calculate_performance(void) const;
93  double calculate_performance(const Vector<double>&) const;
94  double calculate_generalization_performance(void) const;
95 
96  std::string write_performance_term_type(void) const;
97 
98  // Serialization methods
99 
100  tinyxml2::XMLDocument* to_XML(void) const;
101  void from_XML(const tinyxml2::XMLDocument&);
102 
103 private:
104 
105  // MEMBERS
106 
108 
110 };
111 
112 }
113 
114 #endif
115 
116 
117 // OpenNN: Open Neural Networks Library.
118 // Copyright (c) 2005-2015 Roberto Lopez.
119 //
120 // This library is free software; you can redistribute it and/or
121 // modify it under the terms of the GNU Lesser General Public
122 // License as published by the Free Software Foundation; either
123 // version 2.1 of the License, or any later version.
124 //
125 // This library is distributed in the hope that it will be useful,
126 // but WITHOUT ANY WARRANTY; without even the implied warranty of
127 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
128 // Lesser General Public License for more details.
129 
130 // You should have received a copy of the GNU Lesser General Public
131 // License along with this library; if not, write to the Free Software
132 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
UnknownsMethod
Enumeration of the different methods for putting the unknowns into the mathematical model...
tinyxml2::XMLDocument * to_XML(void) const
void set_unknowns_method(const UnknownsMethod &)
void from_XML(const tinyxml2::XMLDocument &)
std::string write_performance_term_type(void) const
Returns a string with the name of the inverser sum squared error performance type, "INVERSE_SUM_SQUARED_ERROR".
std::string write_unknowns_method(void) const
This returns a string with the name of the method for entering the unknown values or functions into t...
const UnknownsMethod & get_unknowns_method(void) const
This returns the method for entering the unknown values or functions into the mathematical model...
UnknownsMethod unknowns_method
Variable containing the method for putting the unknowns into the mathematical model.
double calculate_generalization_performance(void) const