# Locating the Parameters of RBF Networks Using a Hybrid Particle Swarm Optimization Method
## 2 Method Description
### The Proposed PSO Algorithm  
During this phase, arithmetic interval techniques are used to locate a range for the parameters of the RBF network. The interval techniques [51; 52; 53] comprise a common method in global optimization with various applications [54; 55; 56]. The first phase aims to locate the most-promising bounding box for the \(n\) parameters of the corresponding RBF network. The initial bounding box is defined as \(S\), which is a subset of \(\mathbb{R}^{n}\):  
\[S=[a_{1},b_{1}]\otimes[a_{2},b_{2}]\otimes\ldots[a_{n},b_{n}] \tag{8}\]  
The interval method of the first phase divides the set \(S\) subsequently by discarding areas that are not promising enough to contain the global minimum. In order to locate the best interval for Equation (8), a modified PSO algorithm [57] is used. The proposed variant of the PSO method is based on the original technique (Algorithm 1 of [57]); however, the particles are intervals of values, and at each iteration, a normalization of the velocity vector takes place to avoid generating particles outside the original range of values. The PSO method is based on a population of candidate solutions, which, in most cases, are called particles. The method is based on two vectors: the current location of particles denoted as \(\overrightarrow{p}\) and the velocity of their movement denoted as \(\overrightarrow{u}\). The PSO method finds the global minimum by moving the particles based on their previous best position, as well as the best position of the total population of particles. The initial bounding boxes for the centers and variances of the RBF network are constructed using the K-means clustering algorithm. Subsequently, the initial values for the intervals \([a_{i},b_{i}]\) are calculated through Algorithm 3. The values for the intervals of the first\((d+1)\times k\) variables are obtained as a multiple of the positive quantity \(F\) with the values obtained by K-means. The value \(B\) is used to initialize the intervals for the output weight \(\overline{w}\). Afterwards, the following PSO variant is executed:  
1. **Set**\(N_{c}\) as the amount of particles. 2. **Set** the normalization factor \(\lambda\). 3. **Set** the \(k\) weights of the RBF network. 4. **Set**\(N_{g}\) the maximum generations allowed. 5. **Set**\(N_{s}\) the number of random samples that will be used in the fitness calculation algorithm. 6. **Set**\(f^{*}=[\infty,\infty]\), the fitness of the best located particle \(p^{*}\). 7. **Construct**\(S=[a_{1},b_{1}]\otimes[a_{2},b_{2}]\otimes\ldots[a_{n},b_{n}]\), as obtained from the previous two algorithms. 8. **Initialize** the \(N_{c}\) particles. Each particle \(p_{i},\ i=1,...,N_{c}\) is considered as a set of intervals randomly initialized in \(S\). The layout of each particle is graphically presented in Figure 2.
9. **For**\(i=1,...,N_{c}\)**do:** 1. **Calculate** the fitness \(f_{i}\) of particle \(p_{i}\) using the procedure outlined in Algorithm 2. **If**\(L^{*}(f_{i},f^{*})=\text{TRUE}\), **then**\(f^{*}=f_{i},\ p^{*}=p_{i}\)
3. **Set**\(p_{b,i}=p_{i}\), \(f_{b,i}=f_{i}\) as the best located position for particle \(i\) and the associated fitness value. 4. **For**\(j=1,...,n\)**do:** 1. **Set**\(\delta\) the width of interval \(p_{ij}\). 2. **Set**\(u_{ij}=\left[-r\frac{\delta}{20},r\frac{\delta}{20}\right]\), with \(r\) a random number in \([0,1]\). The velocity is initialized to a small sub-interval of the range of values for the corresponding parameter in order to avoid, as much as possible, excessive values for the velocity. This would result in the particles moving out of their value range very quickly, thus making the optimization process difficult. **(e)** **EndFor**. 10. **EndFor**. 11. **Set** iter = 0. 12. **Calculate** the inertia value as \(\omega=\omega_{\text{max}}-\frac{\text{iter}}{N_{g}}\left(\omega_{\text{max}}- \omega_{\text{min}}\right)\), where common values for these parameters are \(\omega_{\text{min}}=0.4\) and \(\omega_{\text{max}}=0.9\).