## 2 Method Description
### The Proposed Algorithm  
The steps of the current method are derived from the steps of the original neural network construction method with the addition of the periodical application of the local optimization algorithm as follows:  
1. **Initialization step**. 1. **Set**\(k=0\) as the generation counter. 2. **Set** as \(N_{g}\) the maximum number of generations and as \(N_{c}\) the number of chromosomes. 3. **Set** as \(p_{s}\) the selection rate and as \(p_{m}\) the mutation rate of the genetic algorithm. 4. **Set** as \(N_{T}\) the number of chromosomes that will be selected to apply the local search optimization method on them. 5. **Set** as \(N_{I}\) the number of generations that should pass before the application of the suggested local optimization technique. 6. **Set** as \(F\) the range of values within which the local optimization method can vary the parameters of the neural network. 7. **Perform** a random initialization of the chromosomes \(g_{i},\ i=1,\ldots,N_{c}\) as sets of random integers. 2. **Fitness Calculation step**. 1. **For**\(i=1,\ldots,N_{c}\)**do** 1. **Produce** the corresponding neural network \(N_{l}(\overrightarrow{x},\overrightarrow{w_{i}})\) for the chromosome \(g_{i}\), The production is performed using the procedure of Section 2.1. The vector \(\overrightarrow{w_{i}}\) denotes the set of parameters produced for the chromosome \(g_{i}\). 2. **Set** as \(f_{i}=\sum_{j=1}^{M}\left(N_{i}\left(\overrightarrow{x}_{j},\overrightarrow{ w_{i}}\right)-y_{j}\right)^{2}\) the fitness of chromosome \(i\). The set \(\left(\overrightarrow{x_{j}},y_{j}\right),\ j=1,...,M\) represents the train set. 2. **EndFor** 3. **Genetic operations step**. 1. **Copy** the best \((1-p_{s})\times N_{c}\) chromosomes according to their fitness values to the next generation. 2. **Apply the crossover procedure. This procedure creates \(p_{s}\times N_{c}\) offsprings from the current population. Two chromosomes \((z,w)\) are selected through tournament selection for every created couple \((\tilde{z},\widehat{w})\) of otssprings. These offsprings are created using the one-point crossover procedure, which is demonstrated in Figure 2. 3. **Apply** the mutation procedure. During this procedure, a random number \(r\in[0,1]\) is selected from uniform distribution for every element of each chromosome. If \(r\leq p_{m}\), then the current element is altered randomly.  
4. **Local search step.** 1. **If**\(k\bmod N_{I}=0\)**then** 1. **Set**\(S=\left\{g_{r_{1}},g_{r_{2}},\ldots,g_{r_{N_{T}}}\right\}\) a set of chromosomes of the current population that are selected randomly. 2. **For**\(j=1,\ldots,N_{T}\), apply the procedure described in Section 2.3 on chromosome \(g_{rj}\). 2. **Endif** 5. **Termination check step**. 1. **Set**\(k=k+1\) 2. **If**\(k\leq N_{g}\) go to Fitness Calculation Step, **else** 1. **Obtain** the chromosome \(g^{*}\) that has the lowest fitness value among the population. 2. **Produce** the corresponding neural network \(N^{*}\left(\overrightarrow{x},\overrightarrow{w^{k}}\right)\) for this chromosome. The vector \(\overrightarrow{w^{k}}\) denotes the set of parameters for the chromosome \(g^{*}\). 3. **Obtain** the corresponding test error for \(N^{*}\left(\overrightarrow{x},\overrightarrow{w^{k}}\right)\).  
The flowchart for the proposed method is depicted in Figure 3.