OpenNN
Open-source neural networks library
Loading...
Searching...
No Matches
opennn::ModelSelection Class Reference

Orchestrates model selection by combining inputs selection and neurons selection over a TrainingStrategy. More...

#include <model_selection.h>

Public Member Functions

 ModelSelection (TrainingStrategy *=nullptr)
 Constructs a model selection bound to an optional training strategy.
 
const TrainingStrategyget_training_strategy () const
 
bool has_training_strategy () const
 
void set (TrainingStrategy *new_training_strategy)
 
void set_default ()
 Restores default algorithms and parameters for inputs and neurons selection.
 
void check () const
 Checks that the training strategy and its dependencies are consistent before running selection.
 
NeuronsSelectionResults perform_neurons_selection ()
 Runs the configured neurons selection algorithm.
 
InputsSelectionResults perform_input_selection ()
 Runs the configured inputs selection algorithm.
 
void from_JSON (const JsonDocument &)
 Loads model selection configuration from a JSON document.
 
void to_JSON (JsonWriter &) const
 Writes the current model selection configuration to a JSON writer.
 
void save (const filesystem::path &) const
 Saves the model selection configuration to disk.
 
void load (const filesystem::path &)
 Loads the model selection configuration from disk.
 

Detailed Description

Orchestrates model selection by combining inputs selection and neurons selection over a TrainingStrategy.

Constructor & Destructor Documentation

◆ ModelSelection()

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

Constructs a model selection bound to an optional training strategy.

Member Function Documentation

◆ check()

void opennn::ModelSelection::check ( ) const

Checks that the training strategy and its dependencies are consistent before running selection.

◆ from_JSON()

void opennn::ModelSelection::from_JSON ( const JsonDocument & )

Loads model selection configuration from a JSON document.

◆ get_training_strategy()

const TrainingStrategy * opennn::ModelSelection::get_training_strategy ( ) const
inline

◆ has_training_strategy()

bool opennn::ModelSelection::has_training_strategy ( ) const
inline

◆ load()

void opennn::ModelSelection::load ( const filesystem::path & )

Loads the model selection configuration from disk.

◆ perform_input_selection()

InputsSelectionResults opennn::ModelSelection::perform_input_selection ( )

Runs the configured inputs selection algorithm.

Returns
Results including the optimal input variables and error histories.

◆ perform_neurons_selection()

NeuronsSelectionResults opennn::ModelSelection::perform_neurons_selection ( )

Runs the configured neurons selection algorithm.

Returns
Results including the optimal neuron count and error histories.

◆ save()

void opennn::ModelSelection::save ( const filesystem::path & ) const

Saves the model selection configuration to disk.

◆ set()

void opennn::ModelSelection::set ( TrainingStrategy * new_training_strategy)
inline

◆ set_default()

void opennn::ModelSelection::set_default ( )

Restores default algorithms and parameters for inputs and neurons selection.

◆ to_JSON()

void opennn::ModelSelection::to_JSON ( JsonWriter & ) const

Writes the current model selection configuration to a JSON writer.