This concrete class represents a pruning inputs algorithm for the InputsSelection as part of the ModelSelection[1] class. More...
#include <pruning_inputs.h>
Public Member Functions | |
PruningInputs () | |
Default constructor. More... | |
PruningInputs (TrainingStrategy *) | |
virtual | ~PruningInputs () |
Destructor. More... | |
const Index & | get_minimum_inputs_number () const |
Returns the minimum number of inputs in the pruning inputs selection algorithm. More... | |
const Index & | get_maximum_inputs_number () const |
Returns the maximum number of inputs in the pruning inputs selection algorithm. More... | |
const Index & | get_maximum_selection_failures () const |
Returns the maximum number of selection failures in the pruning inputs algorithm. More... | |
void | set_default () |
Sets the members of the pruning inputs object to their default values. More... | |
void | set_minimum_inputs_number (const Index &) |
void | set_maximum_inputs_number (const Index &) |
void | set_maximum_selection_failures (const Index &) |
InputsSelectionResults | perform_inputs_selection () |
Perform the inputs selection with the pruning 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... | |
TrainingStrategy * | get_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 | minimum_inputs_number |
Minimum number of inputs in the neural network. More... | |
Index | maximum_inputs_number |
Maximum number of inputs in the neural network. More... | |
Index | maximum_selection_failures |
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 | |
TrainingStrategy * | training_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})} |
This concrete class represents a pruning 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 37 of file pruning_inputs.h.
|
explicit |
Default constructor.
Definition at line 16 of file pruning_inputs.cpp.
|
explicit |
Training strategy constructor.
new_training_strategy_pointer | Pointer to a training strategy object. |
Definition at line 26 of file pruning_inputs.cpp.
|
virtual |
Destructor.
Definition at line 35 of file pruning_inputs.cpp.
void from_XML | ( | const tinyxml2::XMLDocument & | document | ) |
Deserializes a TinyXML document into this pruning inputs object.
document | TinyXML document containing the member data. |
Definition at line 587 of file pruning_inputs.cpp.
const Index & get_maximum_inputs_number | ( | ) | const |
Returns the maximum number of inputs in the pruning inputs selection algorithm.
Definition at line 50 of file pruning_inputs.cpp.
const Index & get_maximum_selection_failures | ( | ) | const |
Returns the maximum number of selection failures in the pruning inputs algorithm.
Definition at line 58 of file pruning_inputs.cpp.
const Index & get_minimum_inputs_number | ( | ) | const |
Returns the minimum number of inputs in the pruning inputs selection algorithm.
Definition at line 42 of file pruning_inputs.cpp.
void load | ( | const string & | file_name | ) |
Loads a pruning inputs object from a XML-type file.
file_name | Name of pruning inputs XML-type file. |
Definition at line 812 of file pruning_inputs.cpp.
|
virtual |
Perform the inputs selection with the pruning inputs method.
Implements InputsSelection.
Definition at line 167 of file pruning_inputs.cpp.
void save | ( | const string & | file_name | ) | const |
Saves to a XML-type file the members of the pruning inputs object.
file_name | Name of pruning inputs XML-type file. |
Definition at line 797 of file pruning_inputs.cpp.
void set_default | ( | ) |
Sets the members of the pruning inputs object to their default values.
Definition at line 66 of file pruning_inputs.cpp.
void set_maximum_inputs_number | ( | const Index & | new_maximum_inputs_number | ) |
Sets the maximum inputs for the pruning inputs algorithm.
new_maximum_inputs_number | Maximum number of inputs in the pruning inputs algorithm. |
Definition at line 120 of file pruning_inputs.cpp.
void set_maximum_selection_failures | ( | const Index & | new_maximum_selection_failures | ) |
Sets the maximum selection failures for the pruning inputs algorithm.
new_maximum_selection_failures | Maximum number of selection failures in the pruning inputs algorithm. |
Definition at line 144 of file pruning_inputs.cpp.
void set_minimum_inputs_number | ( | const Index & | new_minimum_inputs_number | ) |
Sets the minimum inputs for the pruning inputs algorithm.
new_minimum_inputs_number | Minimum number of inputs in the pruning inputs algorithm. |
Definition at line 96 of file pruning_inputs.cpp.
Tensor< string, 2 > to_string_matrix | ( | ) | const |
Writes as matrix of strings the most representative atributes.
Definition at line 381 of file pruning_inputs.cpp.
void write_XML | ( | tinyxml2::XMLPrinter & | file_stream | ) | const |
Serializes the pruning 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 475 of file pruning_inputs.cpp.
|
private |
Maximum number of inputs in the neural network.
Definition at line 93 of file pruning_inputs.h.
|
private |
Maximum number of epochs at which the selection error increases.
Definition at line 97 of file pruning_inputs.h.
|
private |
Minimum number of inputs in the neural network.
Definition at line 89 of file pruning_inputs.h.