OpenNN
Open-source neural networks library
Loading...
Searching...
No Matches
opennn::GrowingInputs Class Referencefinal

Selects the optimal subset of input features by greedily growing the input set. More...

#include <growing_inputs.h>

Inheritance diagram for opennn::GrowingInputs:
[legend]

Public Member Functions

 GrowingInputs (TrainingStrategy *=nullptr)
 Constructs the algorithm bound to an optional training strategy.
 
Index get_minimum_inputs_number () const override
 Returns the minimum number of inputs the algorithm is allowed to select.
 
Index get_maximum_inputs_number () const override
 Returns the maximum number of inputs the algorithm is allowed to select.
 
void set_default ()
 Restores default bounds, correlation thresholds and stopping criteria.
 
void set_maximum_inputs_number (const Index)
 Sets the upper bound on the number of inputs that may be selected.
 
void set_minimum_inputs_number (const Index)
 Sets the lower bound on the number of inputs that may be selected.
 
void set_maximum_correlation (const float)
 Sets the maximum allowed correlation between selected inputs.
 
void set_minimum_correlation (const float)
 Sets the minimum correlation an input must have with the targets to be considered.
 
InputsSelectionResults perform_input_selection () override
 Runs the greedy input growing procedure until the stopping criterion is met.
 
void from_JSON (const JsonDocument &) override
 Loads algorithm configuration from a JSON document.
 
void to_JSON (JsonWriter &) const override
 Writes algorithm configuration to a JSON writer.
 
- Public Member Functions inherited from opennn::InputsSelection
 InputsSelection (TrainingStrategy *=nullptr)
 Constructs the algorithm bound to an optional training strategy.
 
virtual ~InputsSelection ()=default
 
const TrainingStrategyget_training_strategy () const
 
bool has_training_strategy () const
 
bool get_display () const
 
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.
 
string get_name () const
 
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.
 

Additional Inherited Members

- Public Types inherited from opennn::InputsSelection
enum class  StoppingCondition {
  MaximumTime , SelectionErrorGoal , MaximumInputs , MaximumEpochs ,
  MaximumSelectionFailures
}
 Reasons the inputs selection loop may terminate. More...
 
- Protected Attributes inherited from opennn::InputsSelection
TrainingStrategytraining_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

Selects the optimal subset of input features by greedily growing the input set.

Constructor & Destructor Documentation

◆ GrowingInputs()

opennn::GrowingInputs::GrowingInputs ( TrainingStrategy * = nullptr)

Constructs the algorithm bound to an optional training strategy.

Member Function Documentation

◆ from_JSON()

void opennn::GrowingInputs::from_JSON ( const JsonDocument & )
overridevirtual

Loads algorithm configuration from a JSON document.

Implements opennn::InputsSelection.

◆ get_maximum_inputs_number()

Index opennn::GrowingInputs::get_maximum_inputs_number ( ) const
overridevirtual

Returns the maximum number of inputs the algorithm is allowed to select.

Implements opennn::InputsSelection.

◆ get_minimum_inputs_number()

Index opennn::GrowingInputs::get_minimum_inputs_number ( ) const
overridevirtual

Returns the minimum number of inputs the algorithm is allowed to select.

Implements opennn::InputsSelection.

◆ perform_input_selection()

InputsSelectionResults opennn::GrowingInputs::perform_input_selection ( )
overridevirtual

Runs the greedy input growing procedure until the stopping criterion is met.

Returns
Selection results including the chosen input indices and error history.

Implements opennn::InputsSelection.

◆ set_default()

void opennn::GrowingInputs::set_default ( )

Restores default bounds, correlation thresholds and stopping criteria.

◆ set_maximum_correlation()

void opennn::GrowingInputs::set_maximum_correlation ( const float )

Sets the maximum allowed correlation between selected inputs.

◆ set_maximum_inputs_number()

void opennn::GrowingInputs::set_maximum_inputs_number ( const Index )

Sets the upper bound on the number of inputs that may be selected.

◆ set_minimum_correlation()

void opennn::GrowingInputs::set_minimum_correlation ( const float )

Sets the minimum correlation an input must have with the targets to be considered.

◆ set_minimum_inputs_number()

void opennn::GrowingInputs::set_minimum_inputs_number ( const Index )

Sets the lower bound on the number of inputs that may be selected.

◆ to_JSON()

void opennn::GrowingInputs::to_JSON ( JsonWriter & ) const
overridevirtual

Writes algorithm configuration to a JSON writer.

Implements opennn::InputsSelection.