# An FCM-GABPN Ensemble Approach for Material Feeding Prediction of Printed Circuit Board Template
## 3 Methodology
### Data Preparation and Template Classification with FCM  
Data preparation is to collect the historical data of PCB templates for this study based on the variables given in Table 1. Then, 0-1 normalization was conducted for each variable for the purpose of reducing the influence of value-range difference. On this basis, the input attributes for FCM were selected based on the experience of experts from PCB workshops. The 17 attributes marked with boldface type in Table 1 were selected, in which the attributes of _Ln_ and _Noo_ represent the overall characteristics of the template; the _Mwil_, _Mlsil_, _Mwol_, and _Mlsol_ are the design requirements of the hole and line; and the _Reqq_, _Reqp_, and _Reqa_ are the production scale of each template order. Others are surface-finishing operation options.  
Samples of templates were pre-classified into \(K\) categories with the selected 17 attributes by FCM before they were fed into the BPN. One recent example of FCM application is [PERSON] et al. [27], in which FCM combining with adaptive neural network was applied to predict the lane changes by considering different simulation scenarios, and the results showed that the prediction performance and stability was considerably improved when compared with ANN, SVM, and MLR. Besides, [PERSON] et al. [28] incorporated a dynamic FCM in ANN for the online prediction of companies in the stock exchange. According to experimental results, [PERSON] et al.'s algorithm was efficient at clustering samples. In addition, [PERSON] [29] applied dynamic FCM clustering based ANN approach to reconfigure power-distribution networks. Experimental results indicated that [PERSON]'s approach has some benefits, such as a short process time, a very simple structure, and higher accuracy compared to the others.  
Figure 2: Procedure of the proposed FCM-GABPN.  
FCM performs clustering by minimizing \(\sum\limits_{c=1}^{C}\sum\limits_{i=1}^{n}\mu_{i(c)}^{m}\epsilon_{i(c)}^{2}\), where \(C\) is the required number of clusters; \(n\) is the number of samples; \(\mu_{i(c)}\) represents the membership of sample \(i\) belonging to cluster \(c\); \(\epsilon_{i(c)}\) measures the distance from samples \(i\) to the centroid of \(c\); \(m\in(1,\infty)\) is the hyper-parameter that controls how fuzzy the cluster will be. The procedure of applying FCM to cluster samples is as follows [31]:  
1. The cluster membership value, \(u_{ij}\) (the coefficient giving the degree of \(x_{i}\) being in the \(j^{\text{th}}\) cluster), are initialized randomly and establish an initial clustering result.
2. (Iterations) obtain the centers of each cluster as \(\overline{x}_{(c)}=\left\{\overline{x}_{(c)}\right\}\), \(\overline{x}_{(c)j}=\sum\limits_{i=1}^{n}u_{i(c)}^{m}x_{ij}/\sum\limits_{i=1} ^{n}u_{i(c)}^{m}\), \(1\leq j\leq 17\), \(u_{i(c)}=1/\sum\limits_{i=1}^{C}\left(e_{i(c)}/e_{i(c)}^{2}\right)^{2/(m-1)}\), \(\epsilon_{i(c)}=\sqrt{\sum\limits_{all\;j}\left(x_{ij}-\overline{x}_{(c)j} \right)^{2}}\), where \(x_{ij}\) is the \(j^{\text{th}}\) variable of the selected 17 attributes of sample \(i\), and\(\overline{x}_{(c)}\) is the centroid of cluster \(c\).
3. Re-measure the distance of each PCB template to the centroid of every cluster, and then recalculate the corresponding membership value.
4. Stop if the number of iterations is larger than a set value. Otherwise, return to Step (2).  
After clustering, samples of different categories (clusters) are then trained with different BPNs. First, a membership threshold value \(\mu_{L}\) for selecting samples in network learning has to be determined. Only samples with \(\mu_{i(c)}\geq\mu_{L}\) will be taken in training the BPN to obtain the weights and bias geared to the \(c^{th}\) category. As a result, a sample might be selected by multiple categories.