Loading...
Searching...
No Matches
inputs_selection.h
Go to the documentation of this file.
57 void set_validation_error_goal(const float new_validation_error_goal) { validation_error_goal = new_validation_error_goal; }
59 void set_maximum_validation_failures(const Index new_maximum_validation_failures) { maximum_validation_failures = new_maximum_validation_failures; }
void check() const
Verifies that the training strategy and its dependencies are valid for inputs selection.
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 save(const filesystem::path &) const
Saves the algorithm configuration to disk.
void load(const filesystem::path &)
Loads the algorithm configuration from disk.
InputsSelection(TrainingStrategy *=nullptr)
Constructs the algorithm bound to an optional training strategy.
void set(TrainingStrategy *new_training_strategy)
Definition inputs_selection.h:51
virtual void to_JSON(JsonWriter &) const =0
Writes algorithm configuration to a JSON writer.
void set_display(bool new_display)
Definition inputs_selection.h:55
void set_maximum_time(const float new_maximum_time)
Definition inputs_selection.h:60
virtual InputsSelectionResults perform_input_selection()=0
Runs the inputs selection algorithm until a stopping criterion is met.
TrainingStrategy * training_strategy
Definition inputs_selection.h:91
void set_maximum_validation_failures(const Index new_maximum_validation_failures)
Definition inputs_selection.h:59
virtual void from_JSON(const JsonDocument &)=0
Loads algorithm configuration from a JSON document.
bool has_training_strategy() const
Definition inputs_selection.h:41
void set_maximum_epochs(const Index new_maximum_epochs)
Definition inputs_selection.h:58
void set_validation_error_goal(const float new_validation_error_goal)
Definition inputs_selection.h:57
void set_trials_number(const Index new_trials_number)
Definition inputs_selection.h:53
const TrainingStrategy * get_training_strategy() const
Definition inputs_selection.h:39
virtual void print() const
Prints a human-readable description of the algorithm to stdout.
Definition inputs_selection.h:87
virtual ~InputsSelection()=default
Index maximum_validation_failures
Definition inputs_selection.h:103
float validation_error_goal
Definition inputs_selection.h:99
StoppingCondition
Reasons the inputs selection loop may terminate.
Definition inputs_selection.h:27
@ MaximumInputs
Definition inputs_selection.h:30
@ SelectionErrorGoal
Definition inputs_selection.h:29
@ MaximumSelectionFailures
Definition inputs_selection.h:32
@ MaximumEpochs
Definition inputs_selection.h:31
@ MaximumTime
Definition inputs_selection.h:28
Definition json.h:72
Definition json.h:85
High-level orchestrator pairing a Loss with an Optimizer for a network/dataset.
Definition training_strategy.h:24
Definition adaptive_moment_estimation.h:14
Aggregated results of an inputs selection run including optimal inputs and error histories.
Definition inputs_selection.h:112
vector< Index > optimal_input_variables_indices
Definition inputs_selection.h:151
void print() const
Prints a summary of the selection results to stdout.
float optimum_training_error
Definition inputs_selection.h:145
VectorR mean_validation_error_history
Definition inputs_selection.h:141
VectorR training_error_history
Definition inputs_selection.h:137
VectorR optimal_parameters
Definition inputs_selection.h:133
string write_stopping_condition() const
Returns a human-readable string describing the stopping condition that ended the run.
InputsSelection::StoppingCondition stopping_condition
Definition inputs_selection.h:157
void set(const Index=0)
Resets the structure and reserves storage for the given number of epochs.
VectorR validation_error_history
Definition inputs_selection.h:139
VectorR mean_training_error_history
Definition inputs_selection.h:143
vector< string > optimal_input_variable_names
Definition inputs_selection.h:149
InputsSelectionResults(const Index=0)
Builds an empty results structure able to hold up to the given number of epochs.
float optimum_validation_error
Definition inputs_selection.h:147
void resize_history(const Index new_size)
Resizes the recorded error histories.
VectorB optimal_inputs
Definition inputs_selection.h:153
Index get_epochs_number() const
Returns the number of epochs actually recorded in the histories.
History and final metrics produced by a training run.
Definition optimizer.h:204