## 3 Proposed Method
### Generation of WKDE Map by Weighting the Probability  
This section describes how to apply the probability calculated in the previous section to generate a weighted kernel density estimation (WKDE) map, a technique that reflects the kernel density estimation (KDE). KDE is a probability density estimation method using a kernel function. In addition, it is a nonparametric method that is even applicable to high-dimensional data [23]. The representative kernel functions include Gaussian, uniform, and Epachenikov functions [24]. This paper uses a Gaussian kernel function to estimate the density.  
After calculating the probability, we generate a WKDE map by giving the weight, \(w_{i}\), to the kernel function in order to complement any disadvantages as mentioned earlier. Because the PCB features have \(x\)- and \(y\)-axis coordinates, this method uses the weighted multivariate kernel density estimation.  
Let \(\{x_{1},y_{1}\},\{x_{2},y_{2}\},\cdots,\{x_{m},y_{m}\}\) be the coordinates of the PCB features. The WKDE value is denoted through Equation (9) [25].  
\[\hat{f}(x,y)=\frac{1}{mh}\sum_{i=1}^{m}w_{i}K\bigg{\{}\frac{(x,y)-(x_{i},y_{i} )}{h}\bigg{\}}, \tag{9}\]  
where \(m\) is the total number of PCB features, \(h\) is a scaled kernel that controls the smoothness of the estimate, and \(w_{i}\) is the probability of being classified as a fault. In addition, \(K\) is a Gaussian kernel function.  
KDE and WKDE maps were drawn using the features extracted from the PCB image in Figure 5 as shown in Figure 7. The \(x\) and \(y\) axes in the KDE and WKDE maps represent the coordinates of the features. The \(z\) axis of the KDE map indicates the KDE value, which is calculated based on the coordinates of each feature, whereas the \(z\) axis of the WKDE map is the WKDE value obtained by weighting the probability to the KDE. Because the KDE considers only the density, it has a high KDE value in areas where many features are extracted regardless of the defective area as shown in Figure 7a.  
Consequently, it is difficult to distinguish between a normal area and a fault area on the KDE map. On the other hand, the WKDE value, which reflects the probability, increases when the probability of each feature being classified as a fault is higher than the probability of the other features. Otherwise, the WKDE value decreases because there is a relative difference between the probabilities. The area marked with a circle in Figure 7b has a relatively high WKDE value owing to the weight. That is, because the marked area is densely concentrated with fault features, the WKDE value of this area is higher than the KDE value. In addition, the KDE values in the remaining areas are randomly distributed, but decrease significantly after being weighted. Thus, we can predict the marked area as a fault area.  
Figure 8 shows a three-dimensional (2-D) WKDE map overlapping the original image (Figure 5a). In the 3-D WKDE map, it is difficult to intuitively recognize the coordinates of a feature. Thus, we convert the 3-D image into a two-dimensional (2-D) image to prove that the marked area in Figure 7b is consistent with the real fault area. The area within the dotted line in Figure 8 indicates where the actual faults occur, whereas the shaded area is an area predicted as a fault because the WKDE value exceeds the threshold. As Figure 8 shows, we can confirm that the shaded area matches the dotted area. Therefore, we monitor the WKDE value and predict the features as being a fault if the WKDE value exceeds the threshold. In this paper, we set a WKDE value of higher than 1% as the threshold. However, the threshold changes according to the process yield or to past experience.