growing_inputs.h
1// OpenNN: Open Neural Networks Library
2// www.opennn.net
3//
4// G R O W I N G I N P U T S C L A S S H E A D E R
5//
6// Artificial Intelligence Techniques SL
7// artelnics@artelnics.com
8
9#ifndef GROWINGINPUTS_H
10#define GROWINGINPUTS_H
11
12// System includes
13
14#include <iostream>
15#include <fstream>
16#include <algorithm>
17#include <functional>
18#include <limits>
19#include <cmath>
20#include <ctime>
21
22// OpenNN includes
23
24#include "training_strategy.h"
25#include "inputs_selection.h"
26#include "config.h"
27
28namespace OpenNN
29{
30
32
35
37{
38
39public:
40
41 // Constructors
42
43 explicit GrowingInputs();
44
46
47 // Destructor
48
49 virtual ~GrowingInputs();
50
51 // Get methods
52
53 const Index& get_maximum_inputs_number() const;
54
55 const Index& get_minimum_inputs_number() const;
56
57 const Index& get_maximum_selection_failures() const;
58
59 // Set methods
60
61 void set_default();
62
63 void set_maximum_inputs_number(const Index&);
64
65 void set_minimum_inputs_number(const Index&);
66
67 void set_maximum_selection_failures(const Index&);
68
69 // Order selection methods
70
72
73 // Serialization methods
74
75 Tensor<string, 2> to_string_matrix() const;
76
78
80
81 void save(const string&) const;
82 void load(const string&);
83
84private:
85
87
89
91
93
95
97};
98
99}
100
101#endif
102
103// OpenNN: Open Neural Networks Library.
104// Copyright(C) 2005-2021 Artificial Intelligence Techniques, SL.
105//
106// This library is free software; you can redistribute it and/or
107// modify it under the terms of the GNU Lesser General Public
108// License as published by the Free Software Foundation; either
109// version 2.1 of the License, or any later version.
110//
111// This library is distributed in the hope that it will be useful,
112// but WITHOUT ANY WARRANTY; without even the implied warranty of
113// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
114// Lesser General Public License for more details.
115
116// You should have received a copy of the GNU Lesser General Public
117// License along with this library; if not, write to the Free Software
118// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
This concrete class represents a growing inputs algorithm for the InputsSelection as part of the Mode...
void set_maximum_selection_failures(const Index &)
const Index & get_maximum_inputs_number() const
Returns the maximum number of inputs in the growing inputs selection algorithm.
const Index & get_minimum_inputs_number() const
Returns the minimum number of inputs in the growing inputs selection algorithm.
void from_XML(const tinyxml2::XMLDocument &)
void set_default()
Sets the members of the growing inputs object to their default values.
void load(const string &)
Tensor< string, 2 > to_string_matrix() const
Writes as matrix of strings the most representative atributes.
InputsSelectionResults perform_inputs_selection()
Perform inputs selection with the growing inputs method.
Index maximum_inputs_number
Maximum number of inputs in the neural network.
void set_maximum_inputs_number(const Index &)
void save(const string &) const
Index minimum_inputs_number
Minimum number of inputs in the neural network.
virtual ~GrowingInputs()
Destructor.
GrowingInputs()
Default constructor.
void set_minimum_inputs_number(const Index &)
void write_XML(tinyxml2::XMLPrinter &) const
const Index & get_maximum_selection_failures() const
Returns the maximum number of selection failures in the growing inputs selection algorithm.
Index maximum_selection_failures
Maximum number of epochs at which the selection error increases.
This abstract class represents the concept of inputs selection algorithm for a ModelSelection[1].
This class represents the concept of training strategy for a neural network in OpenNN.
This structure contains the results from the inputs selection.