# An FCM-GABPN Ensemble Approach for Material Feeding Prediction of Printed Circuit Board Template
## 3 Methodology
### GABPN-Based Scrap Rate Prediction for Each Category  
The configuration of the BPN is established as follows:  
1. Input: the 0-1 normalized data of the selected attributes for each category. 2. Architecture: Single hidden layer (number of nodes in the input layer + number of nodes in the output layer)/2 is one of the commonly used ways to determine the suitable number of neurons in the hidden layer. Therefore, the number of nodes in hidden layer is depended on the number of selected attributes in this study. In order to achieve better prediction accuracy (a large number of the hidden-layer nodes are theoretically conducive to improve the predicting accuracy) and to keep the consistency, the number of neurons in the hidden layer of each BPN was set to 12 for each category in the proposed approach, considering the number of selected attributes (up to 23 selected attributes for the samples that will be discussed in Section 4). 3. Output: normalized scrap rate forecast of the template. 4. Learning rule: Delta rule (the adjustment of weight and bias is proportional to the negative gradient of the error during the backward-propagation procedure). 5. Propagation function: sigmoid activation function, \(f(x_{j})=1/(1+e^{-x_{j}})\). 6. Learning rate: 0.05. 7. Number of iterations: 25,000. The performance of a BPN is sensitive to the initial condition. Therefore, the optimization of the initial weights and biases of BPN with GA was conducted. The design and configuration of GA is as follows:  
1. Encoding and decoding: The individual chromosome in the population was encoded as \([W_{1},\Phi_{1},W_{2},\Phi_{2}]\) in which \(W_{1}=[w_{1,1},w_{1,2},..,w_{1,12},w_{2,1},w_{2,2},..,w_{2,12},w_{i,1},w_{i,2},...,w_{i,12}]\) (selected \(i\) attributes as input and the number of neurons in the hidden layer is 12) represents the weights between nodes in input layer and hidden layer; \(W_{1}=[w_{1,1},w_{2,1},...,w_{12,1}]\) represents the weights between the nodes in hidden layer and output layer; \(\Phi_{1}=[\theta_{1},\theta_{2},...,\theta_{12}]\) is the bias vector of nodes in the hidden layer; and \(\Phi_{2}\) is the bias of output node. The decoding is to assign corresponding weights and bias to each node based on the BPN structure, and then conduct the forward propagation to compute the output of each BPN. 2. Population initialization: Each individual chromosome in the population was initialized randomly with its elements between \(-3\) and \(3\), based on the encoding principle. 3. Fitness evaluation: The sum of absolute error between reversely normalized scrap rate forecast \(\delta_{k}\) and actual scrap rate \(o_{k}\) was taken as the fitness \(F=\sum\left|\delta_{k}-o_{k}\right|\) for each individual. The smaller the fitness is, the more accurate prediction result it can obtain. Thereafter, the minimization objective function, which the problem seeks to optimize, is the same as the fitness function. 4. Reproduction, crossover and mutation operation:  
Reproduction: The roulette wheel selection was taken to select individuals for reproduction in which the fittest individuals have a greater chance of survival than weaker ones. The probability of each individual being selected is \(p_{i}=(1/F_{i})/\sum_{j=1}^{N}\left(1/F_{j}\right)\), where \(F_{i}\) is the fitness of the \(i\)th individual and \(N\) is the number of individuals. Crossover: Two empty offspring chromosomes, O1 and O2, were initialized first, and two chromosomes, P1 and P2, were randomly selected from the reproduced population. The crossover location was randomly selected, and then the offspring O1 consisted of the genes of P1 before the crossover location and genes of P2 after the crossover location; while offspring O2 consisted of the genes of P2 before the crossover location and genes of P1 after the crossover location. Mutation: One-point mutation was utilized as the mutation operator. The chromosome in the population was randomly selected, and one gene was chosen randomly from the selected chromosome.