OpenNN
2.2
Open Neural Networks Library
|
#include <model_selection.h>
Classes | |
struct | ModelSelectionResults |
Public Types | |
enum | InputsSelectionMethod { MaximumLinearCorrelation, MaximumLogisticCorrelation, Exhaustive } |
Private Attributes | |
TrainingStrategy * | training_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 |
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.
|
explicit |
Training strategy constructor.
new_training_strategy_pointer | Pointer to a gradient descent object. |
Definition at line 37 of file model_selection.cpp.
|
explicit |
File constructor.
file_name | Name of XML model selection file. |
Definition at line 49 of file model_selection.cpp.
|
explicit |
XML constructor.
model_selection_document | Pointer to a TinyXML document containing the model selection data. |
Definition at line 61 of file model_selection.cpp.
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 & | ) |
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.
file_name | Name of model selection XML file. |
Definition at line 1147 of file model_selection.cpp.
void OpenNN::ModelSelection::perform_exhaustive_inputs_selection | ( | void | ) | const |
Definition at line 691 of file model_selection.cpp.
void OpenNN::ModelSelection::perform_inputs_selection | ( | void | ) | const |
Definition at line 815 of file model_selection.cpp.
void OpenNN::ModelSelection::perform_maximum_linear_correlation_inputs_selection | ( | void | ) | const |
Definition at line 667 of file model_selection.cpp.
void OpenNN::ModelSelection::perform_maximum_logistic_correlation_inputs_selection | ( | void | ) | const |
Definition at line 679 of file model_selection.cpp.
ModelSelection::ModelSelectionResults OpenNN::ModelSelection::perform_model_selection | ( | void | ) | const |
Definition at line 1049 of file model_selection.cpp.
ModelSelection::ModelSelectionResults OpenNN::ModelSelection::perform_order_selection | ( | void | ) | const |
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.
file_name | Name 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.
new_complexity_assays_number | Number of hidden neurons. |
new_parameters_assays_number | Number of trainings for each different neural network. |
Definition at line 268 of file model_selection.cpp.
void OpenNN::ModelSelection::set_default | ( | void | ) |
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.
new_display | Display 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.
new_hidden_perceptrons_numbers | Vector 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.
new_inputs_selection_method | Method 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.
new_parameters_assays_number | Number 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.
new_reserve_generalization_performance_data | Flag 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.
new_reserve_generalization_performance_data_statistics | Flag 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.
new_reserve_minimal_parameters | Flag 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.
new_reserve_model_order_selection_plot | Flag 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.
new_reserve_parameters_data | Flag 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.
new_reserve_performance_data | Flag 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.
new_reserve_performance_data_statistics | Flag 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.
new_training_strategy_pointer | Pointer 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.