*/
@Override
public final void process() {
if (this.hidden.size() == 0) {
throw new EncogError(
"To calculate the optimal hidden size, at least "
+ "one hidden layer must be defined.");
}
this.hiddenCounts = new int[this.hidden.size()];
// set the best network
this.bestNetwork = null;
// set to minimums
int i = 0;
for (final HiddenLayerParams parm : this.hidden) {
this.hiddenCounts[i++] = parm.getMin();
}
// make sure hidden layer 1 has at least one neuron
if (this.hiddenCounts[0] == 0) {
throw new EncogError(
"To calculate the optimal hidden size, at least "
+ "one neuron must be the minimum for the first hidden layer.");
}
super.process();