OpenNN  2.2
Open Neural Networks Library
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
OpenNN::ModelSelection Class Reference

#include <model_selection.h>

Classes

struct  ModelSelectionResults
 

Public Types

enum  InputsSelectionMethod { MaximumLinearCorrelation, MaximumLogisticCorrelation, Exhaustive }
 

Public Member Functions

 ModelSelection (void)
 
 ModelSelection (TrainingStrategy *)
 
 ModelSelection (const std::string &)
 
 ModelSelection (const tinyxml2::XMLDocument &)
 
virtual ~ModelSelection (void)
 
TrainingStrategyget_training_strategy_pointer (void) const
 
const Vector< size_t > & get_hidden_perceptrons_numbers (void) const
 
const size_t & get_parameters_assays_number (void) const
 
const bool & get_reserve_parameters_data (void) const
 
const bool & get_reserve_performance_data (void) const
 
const bool & get_reserve_generalization_performance_data (void) const
 
const bool & get_reserve_minimal_parameters (void) const
 
const bool & get_reserve_performance_data_statistics (void) const
 
const bool & get_reserve_generalization_performance_data_statistics (void) const
 
const bool & get_reserve_model_order_selection_plot (void) const
 
const InputsSelectionMethodget_inputs_selection_method (void) const
 
const bool & get_display (void) const
 
void set_training_strategy_pointer (TrainingStrategy *)
 
void set_default (void)
 
void set_hidden_perceptrons_numbers (const Vector< size_t > &)
 
void set_parameters_assays_number (const size_t &)
 
void set_assays_numbers (const size_t &, const size_t &)
 
void set_reserve_parameters_data (const bool &)
 
void set_reserve_performance_data (const bool &)
 
void set_reserve_generalization_performance_data (const bool &)
 
void set_reserve_minimal_parameters (const bool &)
 
void set_reserve_performance_data_statistics (const bool &)
 
void set_reserve_generalization_performance_data_statistics (const bool &)
 
void set_reserve_model_order_selection_plot (const bool &)
 
void set_inputs_selection_method (const InputsSelectionMethod &)
 
void set_display (const bool &)
 
Matrix< double > calculate_linear_correlations (void) const
 
Matrix< double > calculate_logistic_correlations (void) const
 
void check (void) const
 
void perform_maximum_linear_correlation_inputs_selection (void) const
 
void perform_maximum_logistic_correlation_inputs_selection (void) const
 
void perform_exhaustive_inputs_selection (void) const
 
void perform_inputs_selection (void) const
 
ModelSelectionResults perform_order_selection (void) const
 
ModelSelectionResults perform_model_selection (void) const
 
tinyxml2::XMLDocument * to_XML (void) const
 
void from_XML (const tinyxml2::XMLDocument &)
 
void print (void) const
 
void save (const std::string &) const
 
void load (const std::string &)
 

Private Attributes

TrainingStrategytraining_strategy_pointer
 
Vector< Vector< size_t > > inputs_indices
 
Vector< size_t > hidden_perceptrons_numbers
 
size_t parameters_assays_number
 
bool reserve_parameters_data
 
bool reserve_performance_data
 
bool reserve_generalization_performance_data
 
bool reserve_minimal_parameters
 
bool reserve_performance_data_statistics
 
bool reserve_generalization_performance_data_statistics
 
bool reserve_model_order_selection_plot
 
double correlation_goal
 
InputsSelectionMethod inputs_selection_method
 
bool display
 

Detailed Description

This class represents the concept of model selection algorithm. It is used for finding a network architecture with maximum generalization capabilities.

Definition at line 45 of file model_selection.h.

Constructor & Destructor Documentation

OpenNN::ModelSelection::ModelSelection ( TrainingStrategy new_training_strategy_pointer)
explicit

Training strategy constructor.

Parameters
new_training_strategy_pointerPointer to a gradient descent object.

Definition at line 37 of file model_selection.cpp.

OpenNN::ModelSelection::ModelSelection ( const std::string &  file_name)
explicit

File constructor.

Parameters
file_nameName of XML model selection file.

Definition at line 49 of file model_selection.cpp.

OpenNN::ModelSelection::ModelSelection ( const tinyxml2::XMLDocument &  model_selection_document)
explicit

XML constructor.

Parameters
model_selection_documentPointer to a TinyXML document containing the model selection data.

Definition at line 61 of file model_selection.cpp.

Member Function Documentation

Matrix< double > OpenNN::ModelSelection::calculate_linear_correlations ( void  ) const

Returns a matrix with the linear correlations between all input and target variables. The number of rows is the number of input variables. The number of columns is the number of target variables.

Definition at line 529 of file model_selection.cpp.

Matrix< double > OpenNN::ModelSelection::calculate_logistic_correlations ( void  ) const

Returns a matrix with the logistic correlations between all input and target variables. The number of rows is the number of input variables. The number of columns is the number of target variables.

Definition at line 578 of file model_selection.cpp.

void OpenNN::ModelSelection::from_XML ( const tinyxml2::XMLDocument &  )
Todo:

Definition at line 1112 of file model_selection.cpp.

const bool & OpenNN::ModelSelection::get_display ( void  ) const

Returns true if messages from this class can be displayed on the screen, or false if messages from this class can't be displayed on the screen.

Definition at line 209 of file model_selection.cpp.

void OpenNN::ModelSelection::load ( const std::string &  file_name)

Loads the model selection members from a XML file.

Parameters
file_nameName of model selection XML file.

Definition at line 1147 of file model_selection.cpp.

void OpenNN::ModelSelection::perform_exhaustive_inputs_selection ( void  ) const
Todo:
This method is not implemented

Definition at line 691 of file model_selection.cpp.

void OpenNN::ModelSelection::perform_inputs_selection ( void  ) const
Todo:

Definition at line 815 of file model_selection.cpp.

void OpenNN::ModelSelection::perform_maximum_linear_correlation_inputs_selection ( void  ) const
Todo:
This method is not implemented

Definition at line 667 of file model_selection.cpp.

void OpenNN::ModelSelection::perform_maximum_logistic_correlation_inputs_selection ( void  ) const
Todo:
This method is not implemented

Definition at line 679 of file model_selection.cpp.

ModelSelection::ModelSelectionResults OpenNN::ModelSelection::perform_model_selection ( void  ) const
Todo:

Definition at line 1049 of file model_selection.cpp.

ModelSelection::ModelSelectionResults OpenNN::ModelSelection::perform_order_selection ( void  ) const
Todo:

Definition at line 856 of file model_selection.cpp.

void OpenNN::ModelSelection::save ( const std::string &  file_name) const

Saves the model selection members to a XML file.

Parameters
file_nameName of model selection XML file.

Definition at line 1132 of file model_selection.cpp.

void OpenNN::ModelSelection::set_assays_numbers ( const size_t &  new_complexity_assays_number,
const size_t &  new_parameters_assays_number 
)

Sets the numbers of complexities and assays.

Parameters
new_complexity_assays_numberNumber of hidden neurons.
new_parameters_assays_numberNumber of trainings for each different neural network.

Definition at line 268 of file model_selection.cpp.

void OpenNN::ModelSelection::set_default ( void  )
Todo:

Definition at line 230 of file model_selection.cpp.

void OpenNN::ModelSelection::set_display ( const bool &  new_display)

Sets a new display value. If it is set to true messages from this class are to be displayed on the screen; if it is set to false messages from this class are not to be displayed on the screen.

Parameters
new_displayDisplay value.

Definition at line 432 of file model_selection.cpp.

void OpenNN::ModelSelection::set_hidden_perceptrons_numbers ( const Vector< size_t > &  new_hidden_perceptrons_numbers)

Sets the number of complexities to be compared in the model order selection process.

Parameters
new_hidden_perceptrons_numbersVector with different hidden layers sizes.

Definition at line 245 of file model_selection.cpp.

void OpenNN::ModelSelection::set_inputs_selection_method ( const InputsSelectionMethod new_inputs_selection_method)

Sets a new method for selecting the inputs which have more impact on the targets.

Parameters
new_inputs_selection_methodMethod for selecting the inputs (MaximumLinearCorrelation, MaximumLogisticCorrelation or Exhaustive).

Definition at line 419 of file model_selection.cpp.

void OpenNN::ModelSelection::set_parameters_assays_number ( const size_t &  new_parameters_assays_number)

Sets the number of times that each different neural network is to be trained.

Parameters
new_parameters_assays_numberNumber of assays for each set of parameters.

Definition at line 256 of file model_selection.cpp.

void OpenNN::ModelSelection::set_reserve_generalization_performance_data ( const bool &  new_reserve_generalization_performance_data)

Sets the reserve flag for the generalization performance data.

Parameters
new_reserve_generalization_performance_dataFlag value.

Definition at line 364 of file model_selection.cpp.

void OpenNN::ModelSelection::set_reserve_generalization_performance_data_statistics ( const bool &  new_reserve_generalization_performance_data_statistics)

Sets the reserve flag for the generalization performance data statistics.

Parameters
new_reserve_generalization_performance_data_statisticsFlag value.

Definition at line 397 of file model_selection.cpp.

void OpenNN::ModelSelection::set_reserve_minimal_parameters ( const bool &  new_reserve_minimal_parameters)

Sets the reserve flag for the minimal parameters.

Parameters
new_reserve_minimal_parametersFlag value.

Definition at line 375 of file model_selection.cpp.

void OpenNN::ModelSelection::set_reserve_model_order_selection_plot ( const bool &  new_reserve_model_order_selection_plot)

Sets the reserve flag for the model order selection plot.

Parameters
new_reserve_model_order_selection_plotFlag value.

Definition at line 408 of file model_selection.cpp.

void OpenNN::ModelSelection::set_reserve_parameters_data ( const bool &  new_reserve_parameters_data)

Sets the reserve flag for the parameters data.

Parameters
new_reserve_parameters_dataFlag value.

Definition at line 342 of file model_selection.cpp.

void OpenNN::ModelSelection::set_reserve_performance_data ( const bool &  new_reserve_performance_data)

Sets the reserve flag for the performance data.

Parameters
new_reserve_performance_dataFlag value.

Definition at line 353 of file model_selection.cpp.

void OpenNN::ModelSelection::set_reserve_performance_data_statistics ( const bool &  new_reserve_performance_data_statistics)

Sets the reserve flag for the performance data statistics.

Parameters
new_reserve_performance_data_statisticsFlag value.

Definition at line 386 of file model_selection.cpp.

void OpenNN::ModelSelection::set_training_strategy_pointer ( TrainingStrategy new_training_strategy_pointer)

Sets a new training strategy pointer.

Parameters
new_training_strategy_pointerPointer to a training strategy object.

Definition at line 220 of file model_selection.cpp.

tinyxml2::XMLDocument * OpenNN::ModelSelection::to_XML ( void  ) const

Serializes the model selection object into a XML document of the TinyXML library. See the OpenNN manual for more information about the format of this document.

Definition at line 1070 of file model_selection.cpp.


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