|
OpenNN
Open-source neural networks library
|
Abstract base class for algorithms that select the optimal number of hidden neurons. More...
#include <neuron_selection.h>
Public Types | |
| enum class | StoppingCondition { MaximumTime , SelectionErrorGoal , MaximumEpochs , MaximumSelectionFailures , MaximumNeurons } |
| Reasons the neurons selection loop may terminate. More... | |
Public Member Functions | |
| NeuronSelection (TrainingStrategy *=nullptr) | |
| Constructs the algorithm bound to an optional training strategy. | |
| virtual | ~NeuronSelection ()=default |
| const TrainingStrategy * | get_training_strategy () const |
| bool | has_training_strategy () const |
| bool | get_display () const |
| void | set (TrainingStrategy *) |
| Binds the algorithm to the given training strategy. | |
| void | set_training_strategy (TrainingStrategy *new_training_strategy) |
| void | set_default () |
| Restores default search bounds and stopping criteria. | |
| void | set_maximum_neurons (const Index new_maximum_neurons) |
| void | set_minimum_neurons (const Index new_minimum_neurons) |
| void | set_trials_number (const Index new_trials_number) |
| void | set_display (bool new_display) |
| void | set_validation_error_goal (const float new_validation_error_goal) |
| void | set_maximum_epochs (const Index new_maximum_epochs) |
| void | set_maximum_validation_failures (const Index new_maximum_validation_failures) |
| void | set_maximum_time (const float new_maximum_time) |
| void | check () const |
| Verifies that the training strategy and its dependencies are valid for neurons selection. | |
| virtual NeuronsSelectionResults | perform_neurons_selection ()=0 |
| Runs the neurons selection algorithm until a stopping criterion is met. | |
| string | get_name () const |
| virtual void | from_JSON (const JsonDocument &)=0 |
| Loads algorithm configuration from a JSON document. | |
| virtual void | to_JSON (JsonWriter &) const =0 |
| Writes algorithm configuration to a JSON writer. | |
| void | save (const filesystem::path &) const |
| Saves the algorithm configuration to disk. | |
| void | load (const filesystem::path &) |
| Loads the algorithm configuration from disk. | |
| virtual void | print () const |
| Prints a human-readable description of the algorithm to stdout. | |
Protected Attributes | |
| TrainingStrategy * | training_strategy = nullptr |
| VectorR | validation_error_history |
| VectorR | training_error_history |
| Index | minimum_neurons = 0 |
| Index | maximum_neurons = 0 |
| Index | trials_number = 1 |
| float | validation_error_goal = 0 |
| Index | maximum_epochs = 10 |
| Index | maximum_validation_failures = 100 |
| float | maximum_time = 0 |
| bool | display = true |
| string | name |
Abstract base class for algorithms that select the optimal number of hidden neurons.
|
strong |
| opennn::NeuronSelection::NeuronSelection | ( | TrainingStrategy * | = nullptr | ) |
Constructs the algorithm bound to an optional training strategy.
|
virtualdefault |
| void opennn::NeuronSelection::check | ( | ) | const |
Verifies that the training strategy and its dependencies are valid for neurons selection.
|
pure virtual |
Loads algorithm configuration from a JSON document.
Implemented in opennn::GrowingNeurons.
|
inline |
|
inline |
|
inline |
|
inline |
| void opennn::NeuronSelection::load | ( | const filesystem::path & | ) |
Loads the algorithm configuration from disk.
|
pure virtual |
Runs the neurons selection algorithm until a stopping criterion is met.
Implemented in opennn::GrowingNeurons.
|
inlinevirtual |
Prints a human-readable description of the algorithm to stdout.
| void opennn::NeuronSelection::save | ( | const filesystem::path & | ) | const |
Saves the algorithm configuration to disk.
| void opennn::NeuronSelection::set | ( | TrainingStrategy * | ) |
Binds the algorithm to the given training strategy.
| void opennn::NeuronSelection::set_default | ( | ) |
Restores default search bounds and stopping criteria.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
Writes algorithm configuration to a JSON writer.
Implemented in opennn::GrowingNeurons.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |