# Generative Oversampling Method for Imbalanced Data on Bearing Fault Detection and Diagnosis
## 4 Experimental Results
### Testing Classification with Oversampling  
We employed oversampling using DCWGAN-GP to improve the classification accuracy under data imbalance conditions. To mitigate problems caused by severe data imbalance, we trained the DCGAN and the proposed DCWGAN-GP for each fault type, allowing the model to generate synthetic fault images. Each model was trained using the available fault dataset defined in Table 1. Figure 10 shows images computed by DCWGAN-GP for each fault type. The generated images can be distinguished by comparison with normal images, and were similar to the images of real bearing fault data. For comparison, images generated using DCGAN [27] are shown in Figure 11; these images can also be distinguished by comparing with normal images and are similar to real bearing fault images. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Training Time (s)** & **Testing Time (ms)** \\ \hline CBFD with BF-NSP & 805.48 & 2.59 \\ DNN with HHT & 207.50 & 1.30 \\ CNN with CWTS & 66.15 & 0.38 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Computational time comparison of the convolutional neural network (CNN)-based bearing fault detector (CBFD) with the bearing fault-nested scatter plot (BF-NSP) with other methods. Figure 9: Comparison of CBFD with BF-NSP with other methods. The images generated using DCGAN contained background noise. To identify the reason for the noise, we monitored the trend of the loss value in the training step (Figure 12). We found that the loss of the DCGAN generator increased as the step proceeded, and that the loss showed significant variation. Figure 13 shows the losses of the proposed DCWGAN-GP; the losses for both the discriminator and the generator converged toward zero as the training step proceeded. Both models were successfully trained for the fault types, however, the objective function of the WGAN-GP provided superior stability and quality of gradients. We oversampled the fault data of the proposed generative model under various data-imbalanced conditions. Here, the ratio between normal and fault data images is denoted as normal-to-fault ratio (NFR), and the ratio that enhances NFR using oversampling as adjusted NFR (A-NFR). * NFR = (# of normal data images) : (# of fault data images),
* A-NFR = (# of normal data images) : (# of fault data images) + (# of oversampled fault data images). We considered the serious data-imbalanced conditions where NFR > 100:1. In the experiment, not only imbalance ratio, but also the number of samples was considered, because the number of majority and minority datasets had an effect on model training. Firstly, we fixed the number of normal data images to 10,000. Under the condition, we considered two cases of the data-imbalanced condition: fault data images of 50 (which yields NFR = 200:1), and fault data images of 100 (which yield NFR = 100:1). Based on these conditions, we oversampled fault data images using DCGAN and DCWGAN-GP until the number of total fault data images (original and oversampled) reached 500, 1000, 2500, 5000, and 10,000 (which yielded A-NFR = 20:1, 10:1, 5:1, 2:1, and 1:1, respectively). The experimental results of the 10,000 normal data images are shown in Figures 14 and 15. The lower bound of FDD accuracy is 90.77% and 94.63% when NFR is 200:1 and 100:1 without oversampling, respectively. The upper bound of FDD accuracy was 98.99% when NFR was 20:1 without oversampling. Figure 11: Generated images of bearing fault data using the DCGAN. (**a**) Contaminant, (**b**) outer high, (**c**) outer medium, (**d**) outer low, (**e**) inner high, and (**f**) inner medium. Figure 10: Generated images of bearing fault data using the Wasserstein generative adversarial networks with gradient penalty on the DCGAN architecture model (DCWGAN-GP). (**a**) Contaminant, (**b**) outer high, (**c**) outer medium, (**d**) outer low, (**e**) inner high, and (**f**) inner medium. Secondly, we fixed the number of normal data to 20,000.