growing_neurons.h
1// OpenNN: Open Neural Networks Library
2// www.opennn.net
3//
4// G R O W I N G N E U R O N 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 GROWINGNEURONS_H
10#define GROWINGNEURONS_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 "neurons_selection.h"
26#include "config.h"
27
28namespace OpenNN
29{
30
31struct GrowingNeuronsResults;
32
34
37
39{
40
41public:
42
43 // Constructors
44
45 explicit GrowingNeurons();
46
48
49 // Destructor
50
51 virtual ~GrowingNeurons();
52
53 // Get methods
54
55 const Index& get_step() const;
56
57 const Index& get_maximum_selection_failures() const;
58
59 // Set methods
60
61 void set_default();
62
63 void set_neurons_increment(const Index&);
64
65 void set_maximum_selection_failures(const Index&);
66
67 // Order selection methods
68
70
71 // Serialization methods
72
73 Tensor<string, 2> to_string_matrix() const;
74
76
77 void write_XML(tinyxml2::XMLPrinter&) const;
78
79 void save(const string&) const;
80 void load(const string&);
81
82private:
83
85
87
89
91
92};
93
94}
95
96#endif
97
98// OpenNN: Open Neural Networks Library.
99// Copyright(C) 2005-2021 Artificial Intelligence Techniques, SL.
100//
101// This library is free software; you can redistribute it and/or
102// modify it under the terms of the GNU Lesser General Public
103// License as published by the Free Software Foundation; either
104// version 2.1 of the License, or any later version.
105//
106// This library is distributed in the hope that it will be useful,
107// but WITHOUT ANY WARRANTY; without even the implied warranty of
108// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
109// Lesser General Public License for more details.
110
111// You should have received a copy of the GNU Lesser General Public
112// License along with this library; if not, write to the Free Software
113// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
This concrete class represents an growing neurons algorithm for the NeuronsSelection as part of the M...
void set_maximum_selection_failures(const Index &)
virtual ~GrowingNeurons()
Destructor.
void from_XML(const tinyxml2::XMLDocument &)
void set_default()
Sets the members of the model selection object to their default values:
void load(const string &)
GrowingNeurons()
Default constructor.
NeuronsSelectionResults perform_neurons_selection()
Perform neurons selection with the growing neurons method.
Tensor< string, 2 > to_string_matrix() const
Writes as matrix of strings the most representative atributes.
Index neurons_increment
Number of neurons added at each iteration.
void save(const string &) const
void set_neurons_increment(const Index &)
const Index & get_step() const
Returns the number of the hidden perceptrons pointed in each iteration of the growing neurons algorit...
void write_XML(tinyxml2::XMLPrinter &) const
const Index & get_maximum_selection_failures() const
Returns the maximum number of selection failures in the model neurons selection algorithm.
Index maximum_selection_failures
Maximum number of epochs at which the selection error increases.
This abstract class represents the concept of neurons 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 neurons selection.