# Sequential and Comprehensive Algorithm for Fault Detection in Semiconductor Sensors
## 3 Results and Discussion
As a result, the remaining data point consisted of only eight in the form of a balanced dataset. Four points were the representative data in the majority. The group and the other four points were the original data in the minority group (Figure 6A,B). The Voronoi diagram was constructed on the processed clustering map. Each Voronoi region (\(R_{k}\)) is generally defined as follows [39]:  
\[R_{k}=\big{\{}\ x\in\ X\mid d\left(x,\ P_{k}\right)\ \leq\ d\big{(}x,\ P_{j}\big{)}\ \text{for all}\ j\ \
eq k\ \big{\}} \tag{5}\]  
which means that \(R_{k}\) is a group associated with the specific point \(P_{k}\) based on the distance function \(d\). In other words, if a point \(x\) in space \(X\) is nearer to \(P_{k}\) than to other points (i.e., \(P_{j}\)), it could be gathered into the Voronoi region \(R_{k}\). For the distance function, we used Euclidean distance, which is the familiar distance function. \[d[(a_{1},\ a_{2}),(b_{1},\ b_{2})]=\sqrt{\left(a_{1}-b_{1}\right)^{2}+\left(a _{2}-b_{2}\right)^{2}} \tag{6}\]  
According to its definition, we could use the Voronoi diagram to investigate the relevance to the standard data points and observe the faults afterward when new data came in (Figure 6C). If the newly generated data are located in the defective region, they can be classified as a defect. When the data generated in the defect-free region, it can  
Figure 5: Clustering method to understand the intra-class similarity between two non-correlated sensors. This clustering method was iterated with different \(k\) values (\(k\) = 3–10), standing for the number of clusters. Figure 6: Fault detection and classification using the clustering method. (**A**) Imbalanced dataset marking the data (\(N_{i}\)) and the centroid (\(C_{i}\)). (**B**) Balanced dataset processed from the imbalanced dataset to match the amount of data in the minority group and the number of centroids in the majority group. (**C**) Final defect classification. When new data were generated, the algorithm determined whether the data had defects or were defect-free based on the region where the data were located. be classified as defect-free. We employed a binary classification, consisting of 'positive' denoting the defect and 'negative' denoting the defect-free. To evaluate the efficacy of our algorithm, we applied two general and intuitive methods; logistic regression (LR) [40] and one-class support vector machine (OCSVM) [41]. Using these two methods, we made the confusion matrixes (Figure 7) and calculated the evaluation metrics (Table 1). The evaluation metrics we used were accuracy, sensitivity, precision, and F1-score. Accuracy is the ratio of the data classified correctly over the whole data. Sensitivity is the ratio of the defect data classified correctly over whole actual defect data. Precision is the ratio of the defect data classified correctly over the whole data classified as the defect. F1-score is the harmonic mean of the sensitivity and precision. These metrics can be expressed as shown below:  
\[Accuracy=\frac{TP+TN}{TP+TN+FP+FN} \tag{7}\]  
\[Sensitivity=\frac{TP}{TP+FN} \tag{8}\]  
\[Precision=\frac{TP}{TP+FP} \tag{9}\]  
\[F1=\frac{2\times Sensitivity\times Precision}{Sensitivity+Precision}. \tag{10}\]  
In these equations, TP is a true positive (actual defect data classified as a defect). TN is a true negative (actual defect-free data classified as a defect-free). FP is a false positive (actual defect-free data classified as a defect). FN is a false negative (actual defect data classified as defect-free). Accordingly, we obtained the testing accuracy with 92% for LR and 96% for OCSVM. The results are comparable to related methods for FDC in the semiconductor manufacturing process [42; 43]. The semiconductor manufacturing is a highly sophisticated and time-consuming process. In other words, there are too numerous root causes of the faults in the semiconductor manufacturing process, which is accompanied by the significant damage in the yield rate leading to cost and time losses when the wafer faults are found at the end