Abstract base class for algorithms that search the optimal subset of input variables. More...
#include <inputs_selection.h>
Public Types | |
| enum class | StoppingCondition { MaximumTime , SelectionErrorGoal , MaximumInputs , MaximumEpochs , MaximumSelectionFailures } |
| Reasons the inputs selection loop may terminate. More... | |
Public Member Functions | |
| InputsSelection (TrainingStrategy *=nullptr) | |
| Constructs the algorithm bound to an optional training strategy. | |
| virtual | ~InputsSelection ()=default |
| const TrainingStrategy * | get_training_strategy () const |
| bool | has_training_strategy () const |
| bool | get_display () const |
| virtual Index | get_minimum_inputs_number () const =0 |
| Returns the minimum number of input variables that the algorithm may select. | |
| virtual Index | get_maximum_inputs_number () const =0 |
| Returns the maximum number of input variables that the algorithm may select. | |
| void | set (TrainingStrategy *new_training_strategy) |
| 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 inputs selection. | |
| virtual InputsSelectionResults | perform_input_selection ()=0 |
| Runs the inputs 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 |
| Index | trials_number = 1 |
| bool | display = true |
| float | validation_error_goal |
| Index | maximum_epochs |
| Index | maximum_validation_failures = 100 |
| float | maximum_time |
| string | name |
Detailed Description
Abstract base class for algorithms that search the optimal subset of input variables.
Member Enumeration Documentation
◆ StoppingCondition
|
strong |
Constructor & Destructor Documentation
◆ InputsSelection()
| opennn::InputsSelection::InputsSelection | ( | TrainingStrategy * | = nullptr | ) |
Constructs the algorithm bound to an optional training strategy.
◆ ~InputsSelection()
|
virtualdefault |
Member Function Documentation
◆ check()
| void opennn::InputsSelection::check | ( | ) | const |
Verifies that the training strategy and its dependencies are valid for inputs selection.
◆ from_JSON()
|
pure virtual |
Loads algorithm configuration from a JSON document.
Implemented in opennn::GeneticAlgorithm, and opennn::GrowingInputs.
◆ get_display()
|
inline |
◆ get_maximum_inputs_number()
|
pure virtual |
Returns the maximum number of input variables that the algorithm may select.
Implemented in opennn::GeneticAlgorithm, and opennn::GrowingInputs.
◆ get_minimum_inputs_number()
|
pure virtual |
Returns the minimum number of input variables that the algorithm may select.
Implemented in opennn::GeneticAlgorithm, and opennn::GrowingInputs.
◆ get_name()
|
inline |
◆ get_training_strategy()
|
inline |
◆ has_training_strategy()
|
inline |
◆ load()
| void opennn::InputsSelection::load | ( | const filesystem::path & | ) |
Loads the algorithm configuration from disk.
◆ perform_input_selection()
|
pure virtual |
Runs the inputs selection algorithm until a stopping criterion is met.
- Returns
- Results including the chosen inputs, optimal parameters and error histories.
Implemented in opennn::GeneticAlgorithm, and opennn::GrowingInputs.
◆ print()
|
inlinevirtual |
Prints a human-readable description of the algorithm to stdout.
◆ save()
| void opennn::InputsSelection::save | ( | const filesystem::path & | ) | const |
Saves the algorithm configuration to disk.
◆ set()
|
inline |
◆ set_display()
|
inline |
◆ set_maximum_epochs()
|
inline |
◆ set_maximum_time()
|
inline |
◆ set_maximum_validation_failures()
|
inline |
◆ set_trials_number()
|
inline |
◆ set_validation_error_goal()
|
inline |
◆ to_JSON()
|
pure virtual |
Writes algorithm configuration to a JSON writer.
Implemented in opennn::GeneticAlgorithm, and opennn::GrowingInputs.
Member Data Documentation
◆ display
|
protected |
◆ maximum_epochs
|
protected |
◆ maximum_time
|
protected |
◆ maximum_validation_failures
|
protected |
◆ name
|
protected |
◆ training_strategy
|
protected |
◆ trials_number
|
protected |
◆ validation_error_goal
|
protected |