OpenNN  2.2
Open Neural Networks Library
neural_parameters_norm.h
1 /****************************************************************************************************************/
2 /* */
3 /* OpenNN: Open Neural Networks Library */
4 /* www.artelnics.com/opennn */
5 /* */
6 /* N E U R A L P A R A M E T E R S N O R M 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 __NEURALPARAMETERSNORM_H__
15 #define __NEURALPARAMETERSNORM_H__
16 
17 // System includes
18 
19 #include <iostream>
20 #include <fstream>
21 #include <cmath>
22 #include <sstream>
23 #include <string>
24 #include <limits>
25 
26 // OpenNN includes
27 
28 #include "performance_term.h"
29 
30 // TinyXml includes
31 
32 #include "../tinyxml2/tinyxml2.h"
33 
34 namespace OpenNN
35 {
36 
39 
41 {
42 
43 public:
44 
45  // DEFAULT CONSTRUCTOR
46 
47  explicit NeuralParametersNorm(void);
48 
49  // NEURAL NETWORK CONSTRUCTOR
50 
52 
53  // XML CONSTRUCTOR
54 
55  explicit NeuralParametersNorm(const tinyxml2::XMLDocument&);
56 
57  // DESTRUCTOR
58 
59  virtual ~NeuralParametersNorm(void);
60 
61  // METHODS
62 
63  // Get methods
64 
65  const double& get_neural_parameters_norm_weight(void) const;
66 
67  // Set methods
68 
69  void set_neural_parameters_norm_weight(const double&);
70 
71  void set_default(void);
72 
73  // Checking methods
74 
75  void check(void) const;
76 
77  // performance methods
78 
79  double calculate_performance(void) const;
82 
83  double calculate_performance(const Vector<double>&) const;
86 
87 // double calculate_generalization_performance(void) const;
88 
89  std::string write_performance_term_type(void) const;
90 
91  std::string write_information(void) const;
92 
93  // Serialization methods
94 
95  tinyxml2::XMLDocument* to_XML(void) const;
96 
97  void from_XML(const tinyxml2::XMLDocument&);
98 
99 private:
100 
102 
104 
105 };
106 
107 }
108 
109 #endif
110 
111 
112 // OpenNN: Open Neural Networks Library.
113 // Copyright (c) 2005-2015 Roberto Lopez.
114 //
115 // This library is free software; you can redistribute it and/or
116 // modify it under the terms of the GNU Lesser General Public
117 // License as published by the Free Software Foundation; either
118 // version 2.1 of the License, or any later version.
119 //
120 // This library is distributed in the hope that it will be useful,
121 // but WITHOUT ANY WARRANTY; without even the implied warranty of
122 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
123 // Lesser General Public License for more details.
124 
125 // You should have received a copy of the GNU Lesser General Public
126 // License along with this library; if not, write to the Free Software
127 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
std::string write_performance_term_type(void) const
void from_XML(const tinyxml2::XMLDocument &)
Vector< double > calculate_gradient(void) const
std::string write_information(void) const
const double & get_neural_parameters_norm_weight(void) const
Returns the weight value for the neural parameters norm in the performance term expression.
void set_neural_parameters_norm_weight(const double &)
Sets a new weight value for the neural parameters norm in the performance term expression.
tinyxml2::XMLDocument * to_XML(void) const
Returns a representation of the sum squared error object, in XML format.
double neural_parameters_norm_weight
Weight value for the neural parameters norm regularization term.
Matrix< double > calculate_Hessian(void) const