GrowingInputs Class Reference

This concrete class represents a growing inputs algorithm for the InputsSelection as part of the ModelSelection[1] class. More...

#include <growing_inputs.h>

Inheritance diagram for GrowingInputs:
InputsSelection

Public Member Functions

 GrowingInputs ()
 Default constructor. More...
 
 GrowingInputs (TrainingStrategy *)
 
virtual ~GrowingInputs ()
 Destructor. More...
 
const Index & get_maximum_inputs_number () const
 Returns the maximum number of inputs in the growing inputs selection algorithm. More...
 
const Index & get_minimum_inputs_number () const
 Returns the minimum number of inputs in the growing inputs selection algorithm. More...
 
const Index & get_maximum_selection_failures () const
 Returns the maximum number of selection failures in the growing inputs selection algorithm. More...
 
void set_default ()
 Sets the members of the growing inputs object to their default values. More...
 
void set_maximum_inputs_number (const Index &)
 
void set_minimum_inputs_number (const Index &)
 
void set_maximum_selection_failures (const Index &)
 
InputsSelectionResults perform_inputs_selection ()
 Perform inputs selection with the growing inputs method. More...
 
Tensor< string, 2 > to_string_matrix () const
 Writes as matrix of strings the most representative atributes. More...
 
void from_XML (const tinyxml2::XMLDocument &)
 
void write_XML (tinyxml2::XMLPrinter &) const
 
void save (const string &) const
 
void load (const string &)
 
- Public Member Functions inherited from InputsSelection
 InputsSelection ()
 Default constructor. More...
 
 InputsSelection (TrainingStrategy *)
 
virtual ~InputsSelection ()
 Destructor. More...
 
TrainingStrategyget_training_strategy_pointer () const
 Returns a pointer to the training strategy object. More...
 
bool has_training_strategy () const
 Returns true if this inputs selection algorithm has a training strategy associated, and false otherwise. More...
 
const Index & get_trials_number () const
 Returns the number of trials for each network architecture. More...
 
const bool & get_display () const
 
const type & get_selection_error_goal () const
 Returns the goal for the selection error in the inputs selection algorithm. More...
 
const Index & get_maximum_iterations_number () const
 Returns the maximum number of iterations in the inputs selection algorithm. More...
 
const type & get_maximum_time () const
 Returns the maximum time in the inputs selection algorithm. More...
 
const type & get_maximum_correlation () const
 Return the maximum correlation for the algorithm. More...
 
const type & get_minimum_correlation () const
 Return the minimum correlation for the algorithm. More...
 
const type & get_tolerance () const
 
void set (TrainingStrategy *)
 
void set_default ()
 Sets the members of the inputs selection object to their default values. More...
 
void set_trials_number (const Index &)
 
void set_display (const bool &)
 
void set_selection_error_goal (const type &)
 
void set_maximum_epochs_number (const Index &)
 
void set_maximum_time (const type &)
 
void set_maximum_correlation (const type &)
 
void set_minimum_correlation (const type &)
 
string write_stopping_condition (const TrainingResults &) const
 
void check () const
 Checks that the different pointers needed for performing the inputs selection are not nullptr. More...
 
Index get_input_index (const Tensor< DataSet::VariableUse, 1 > &, const Index &)
 
const string write_time (const type &) const
 Writes the time from seconds in format HH:mm:ss. More...
 

Private Attributes

Index maximum_inputs_number
 Maximum number of inputs in the neural network. More...
 
Index minimum_inputs_number = 1
 Minimum number of inputs in the neural network. More...
 
Index maximum_selection_failures = 100
 Maximum number of epochs at which the selection error increases. More...
 

Additional Inherited Members

- Public Types inherited from InputsSelection
enum class  StoppingCondition {
  MaximumTime , SelectionErrorGoal , MaximumInputs , MinimumInputs ,
  MaximumEpochs , MaximumSelectionFailures , CorrelationGoal
}
 Enumeration of all possibles condition of stop for the algorithms. More...
 
- Protected Attributes inherited from InputsSelection
TrainingStrategytraining_strategy_pointer = nullptr
 Pointer to a training strategy object. More...
 
Tensor< Index, 1 > original_input_columns_indices
 
Tensor< Index, 1 > original_target_columns_indices
 
Index trials_number = 1
 Number of trials for each neural network. More...
 
bool display = true
 Display messages to screen. More...
 
type selection_error_goal
 Goal value for the selection error. It is used as a stopping criterion. More...
 
Index maximum_epochs_number
 Maximum number of epochs to perform_inputs_selection. It is used as a stopping criterion. More...
 
type maximum_correlation
 Maximum value for the correlations. More...
 
type minimum_correlation
 Minimum value for the correlations. More...
 
type maximum_time
 Maximum selection algorithm time. It is used as a stopping criterion. More...
 
const Eigen::array< int, 1 > rows_sum = {Eigen::array<int, 1>({1})}
 

Detailed Description

This concrete class represents a growing inputs algorithm for the InputsSelection as part of the ModelSelection[1] class.

[1] Neural Designer "Model Selection Algorithms in Predictive Analytics." https://www.neuraldesigner.com/blog/model-selection

Definition at line 36 of file growing_inputs.h.

Constructor & Destructor Documentation

◆ GrowingInputs() [1/2]

GrowingInputs ( )
explicit

Default constructor.

Definition at line 16 of file growing_inputs.cpp.

◆ GrowingInputs() [2/2]

GrowingInputs ( TrainingStrategy new_training_strategy_pointer)
explicit

Training strategy constructor.

Parameters
new_training_strategy_pointerPointer to a training strategy object.

Definition at line 26 of file growing_inputs.cpp.

◆ ~GrowingInputs()

~GrowingInputs ( )
virtual

Destructor.

Definition at line 35 of file growing_inputs.cpp.

Member Function Documentation

◆ from_XML()

void from_XML ( const tinyxml2::XMLDocument document)

Deserializes a TinyXML document into this growing inputs object.

Parameters
documentTinyXML document containing the member data.

Definition at line 602 of file growing_inputs.cpp.

◆ get_maximum_inputs_number()

const Index & get_maximum_inputs_number ( ) const

Returns the maximum number of inputs in the growing inputs selection algorithm.

Definition at line 42 of file growing_inputs.cpp.

◆ get_maximum_selection_failures()

const Index & get_maximum_selection_failures ( ) const

Returns the maximum number of selection failures in the growing inputs selection algorithm.

Definition at line 58 of file growing_inputs.cpp.

◆ get_minimum_inputs_number()

const Index & get_minimum_inputs_number ( ) const

Returns the minimum number of inputs in the growing inputs selection algorithm.

Definition at line 50 of file growing_inputs.cpp.

◆ load()

void load ( const string &  file_name)

Loads a growing inputs object from a XML-type file.

Parameters
file_nameName of growing inputs XML-type file.

Definition at line 830 of file growing_inputs.cpp.

◆ perform_inputs_selection()

InputsSelectionResults perform_inputs_selection ( )
virtual

Perform inputs selection with the growing inputs method.

Implements InputsSelection.

Definition at line 171 of file growing_inputs.cpp.

◆ save()

void save ( const string &  file_name) const

Saves to a XML-type file the members of the growing inputs object.

Parameters
file_nameName of growing inputs XML-type file.

Definition at line 815 of file growing_inputs.cpp.

◆ set_default()

void set_default ( )

Sets the members of the growing inputs object to their default values.

Definition at line 66 of file growing_inputs.cpp.

◆ set_maximum_inputs_number()

void set_maximum_inputs_number ( const Index &  new_maximum_inputs_number)

Sets the maximum inputs number for the growing inputs selection algorithm.

Parameters
new_maximum_inputs_numberMaximum inputs number in the growing inputs selection algorithm.

Definition at line 100 of file growing_inputs.cpp.

◆ set_maximum_selection_failures()

void set_maximum_selection_failures ( const Index &  new_maximum_selection_failures)

Sets the maximum selection failures for the growing inputs selection algorithm.

Parameters
new_maximum_selection_failuresMaximum number of selection failures in the growing inputs selection algorithm.

Definition at line 148 of file growing_inputs.cpp.

◆ set_minimum_inputs_number()

void set_minimum_inputs_number ( const Index &  new_minimum_inputs_number)

Sets the minimum inputs number for the growing inputs selection algorithm.

Parameters
new_minimum_inputs_numberMinimum inputs number in the growing inputs selection algorithm.

Definition at line 124 of file growing_inputs.cpp.

◆ to_string_matrix()

Tensor< string, 2 > to_string_matrix ( ) const

Writes as matrix of strings the most representative atributes.

Definition at line 396 of file growing_inputs.cpp.

◆ write_XML()

void write_XML ( tinyxml2::XMLPrinter file_stream) const

Serializes the growing inputs object into a XML document of the TinyXML library without keep the DOM tree in memory. See the OpenNN manual for more information about the format of this document.

Definition at line 490 of file growing_inputs.cpp.

Member Data Documentation

◆ maximum_inputs_number

Index maximum_inputs_number
private

Maximum number of inputs in the neural network.

Definition at line 88 of file growing_inputs.h.

◆ maximum_selection_failures

Index maximum_selection_failures = 100
private

Maximum number of epochs at which the selection error increases.

Definition at line 96 of file growing_inputs.h.

◆ minimum_inputs_number

Index minimum_inputs_number = 1
private

Minimum number of inputs in the neural network.

Definition at line 92 of file growing_inputs.h.


The documentation for this class was generated from the following files: