The model selection is applied to find a neural network with a topology that minimize the error for new data. There are two ways to obtain an optimal topology, the neurons selection and the inputs selection.
Neurons selection algorithms are used to get the optimal number of neurons in the hidden perceptron layer of the neural network. Inputs selection algorithms are responsible for finding the optimal subset of inputs.
As we did in the previous sections, we will continue working with the iris data set, which can be downloaded from DataSet class chapter. Before continuing it is also advisable to read the previous chapter TrainingStrategy class.
To construct a model selection object associated to a training strategy object we do the following:
where training_strategy is the training strategy object.
The default model selection consists on a growing inputs selection algorithm, an incremental neurons selection algorithm. The next sentence allows to change
GeneticAlgorithm* genetic_algorithm = model_selection.get_genetic_algorithm_pointer();
IncrementalNeurons* incremental_neurons = model_selection.get_incremental_neurons_pointer();
The most important methods of a model selection are the one that perform the inputs and the neurons selection. Respectively, they are called as follows;
We can save the above object to a XML file.
If you need more information about ModelSelection class visit ModelSelection Class Reference.TestingAnalysis ⇒ ⇐ TrainingStrategy