# A Modified Bayesian Network Model to Predict Reorder Level of Printed Circuit Board
## 3 Modified Bayesian Network Model Development
### Conditional Expected Loss-Based Classification  
Classification can be conducted based on learned BN structure and joint probability (the product of all the conditional probabilities of the network). Posterior probability of the reorder level can be calculated according to the Bayesian equation. Lastly, each sample can be predicted to the reorder level corresponding to the greatest posterior probability. However, a sample with a reorder level 1 misclassified as 2, 3, or 4 will bring economic risk if it is taken for batch production. At the same time, posterior probabilities of the biased reorder level may bring a different misclassification. Posterior probabilities of the training samples with observed reorder level 2, 3, or 4 based on the modified BN are given in Figure 6 according to initial experiments in which the posterior probabilities is generated by the formula below. \[P(Pr\_\text{Rel}_{i}|Ob\_\text{Rel}=2,3,4)=\frac{P(Pr\_\text{Rel}_{i})P(Ob\_ \text{Rel}=2,3,4|Pr\_\text{Rel}_{i})}{\sum_{j=1}^{4}P(Pr\_\text{Rel}_{j})P( Ob\_\text{Rel}=2,3,4|Pr\_\text{Rel}_{j})} \tag{6}\]  
where \(P(Pr\_\text{Rel}_{i})\) is the probability of predicted reorder level \(i\) (\(i=1,2,3,4\)), \(P(Ob\_\text{Rel}=2,3,4)\) is the probability of observed reorder level with the value of 2, 3, or 4, \(P(Ob\_\text{Rel}=2,3,4|Pr\_\text{Rel}_{i})\) is the posterior probabilities of observed reorder level with the value of 2, 3, or 4 on the condition of  
Figure 5: Bayesian network structure with entropy information and link strength percentage. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Variables and Factors** & _Ln_ & _Rec_ & _F1_ & _F2_ & _F3_ & _F4_ & _F5_ & _F6_ & _F7_ \\ \hline _Ln_ & 1 & 0.0018 & 0.002 & 0.0023 & 0.0703 & 0.0729 & 0.0307 & 0.0934 & 0.0023 \\ _Rec_ & & 1 & 0.01 & 0.019 & 0.005 & 0.041 & 0.0047 & 0.0108 & 0.0277 \\ _F1_ & & & 1 & 0.0681 & 0.1004 & 0.141 & 0.0411 & 0.1098 & 0.1108 \\ _F2_ & & & & 1 & 0.0357 & 0.0125 & 0.0121 & 0.0226 & 0.1445 \\ _F3_ & & & & & 1 & 0.099 & 0.041 & 0.2215 & 0.087 \\ _F4_ & & & & & 1 & 0.0461 & 0.1121 & 0.0192 \\ _F5_ & & & & & & 1 & 0.0891 & 0.0144 \\ _F6_ & & & & & & & 1 & 0.027 \\ _F7_ & & & & & & & & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Conditional mutual information matrix. the predicted reorder level \(i\) and \(P(Pr\_Rel_{i}|Ob\_Rel=2,3,4)\) is the posterior probabilities of predicted reorder level on the condition of observed reorder level as 2, 3, or 4. It can be seen that samples to be predicted as 3 and 4 are small and the corresponding posterior probabilities subjects to serious left skewed distribution with a mean value less than 0.25. In contrast, samples to be predicted as 1 or 2 are subject to right skewed distribution with a mean value greater than 0.5. This indicates that the posterior probability-based classification has high posterior probability to predict the reorder level of 1 with an observed value equal to or greater than 2 in many cases. Only a few instances with observed \(Rel\) = 3 or 4 have been predicted as 3 or 4. Figure 7 illustrates the posterior probabilities of 100 randomly selected samples obtained by Equation (6) with observed \(Rel\) = 2 and \(Rel\) = 4 in which the probability of 1, 2, 3, and 4 corresponds to a predicted reorder level 1, 2, 3, and 4, respectively. Posterior probability in Figure 7a illustrates that it is easy to predict the reorder level of 2 to 1. Figure 7b illustrates that many posterior probabilities corresponding to the predicted reorder level 4 have no significant possibility for classifying it as 4. Therefore, the conditional expected loss was introduced instead of a posterior probability for the final classification decision. Let \(\alpha_{i}\) be the decision to classify sample \(X\) as \(\alpha_{i}\), \(\lambda_{ij}=\lambda(\alpha_{i},\omega_{j})\)represents the loss (risk) to classify \(X\) with observed value \(\omega_{j}\) to \(\alpha_{i}\), and all the \(\lambda_{ij}=\lambda(\alpha_{i},\omega_{j})\)\(i,j=1,2,3,4\), consist of classification loss matrix.