# Generative Oversampling Method for Imbalanced Data on Bearing Fault Detection and Diagnosis
## 3 Generative Model for Oversampling Fault Condition Data  
The performance of FDD heavily depended on the designated frequency bands in BF-NSP and the architecture of the CBFD model. However, here, we emphasize the training method used for the data-imbalance conditions.  
CNN-based classification performs well when the distribution of classes is roughly balanced. However, faulty condition data are generally lower in volume than normal condition data [20]. Such imbalances cause lower recognition accuracy for the minor class, in this case the faulty condition data. This phenomenon is important because the recognition rate of faulty conditions is the most important practical measure of effective FDD in engineering applications [30].  
There are three solution types for data imbalance: oversampling [11; 21], down-sampling [22], and ensemble learning [23]. For extreme cases such as rare occurrence fault condition data, oversampling was the most suitable approach. In contrast, reducing the size of the entire dataset by down-sampling and modeling of the minor data can cause a lack of data and make training itself impossible.  
To solve the data-imbalance problem in FDD, we considered a generative oversampling method. Oversampling with generative adversarial networks (GANs) improved FDD accuracy in a previous study [11].  
GANs [31] represent a class of generative models based on a game theory scenario in which a generator network G competes against an adversary D, a discriminator. DCGAN [27] is an extended model of GAN that uses de-convolution layers in the generator and convolution layers in the discriminator to extract features of images and construct a model to generate realistic fake images. By using DCGAN, BF-NSP can be generated and used for oversampling. Figure 5 shows the DCGAN architecture employed in this study, in which we considered the convergence problem of DCGAN.  
GANs aim to approximate the probability distribution function that the input data are assumed to be drawn from. In the original formulation of GANs [31], it was achieved by treating the discriminator as a binary classifier for real and fake data distributions. In this way, the discriminator provides meaningful gradients for the generator so that it minimizes the Jensen-Shannon (JS) divergence between the real and fake data distributions. However, this process is shown to be extremely unstable and difficult to train in practice. It has been shown that even in considerably simple scenarios the JS divergence does not supply useful gradients for the generator [32]. For this reason, numerous recent  
Figure 4: Convolutional neural network (CNN)-based bearing fault detector (CBFD) architecture.  
studies have focused on improving the stability and performance of GANs by enhancing the quality of the gradients derived from the discriminator.  
To stabilize our generative model, we propose WGAN-GP [26] on the DCGAN architecture model (DCWGAN-GP). The original WGAN [32] exploited earth mover's distance (EMD) as a better means to measure the similarity between the two distributions. In this way, the losses of the discriminator and the generator correlate well with the output image quality. WGAN-GP utilizes the same distance measurement but ensures higher stability by penalizing the norm of the discriminator's output with respect to its input data. Our DCWGAN-GP is therefore resilient to the vanishing gradients problem and generates realistic fake images in a stable manner.  
When input data are imbalanced, minor data are oversampled by the generative model until the desired ratio is met; at this point, we trained the CBFD model.