# Generative Oversampling Method for Imbalanced Data on Bearing Fault Detection and Diagnosis
## 4 Experimental Results
### Testing Classification under Data Imbalanced Conditions  
Before evaluating CBFD under data imbalanced condition, we considered two issues: (1) that the data imbalance ratio affects the performance of the classifier more than the number of minority classes; and (2) that the learning rate and epoch number should be considered to prevent over-fitting. In [11], the degradation of FDD classification accuracy under an unbalanced normal and fault condition ratio was demonstrated; for example,  
* False alarms, identified when FDD determines a fault despite normal condition;
* Misfiring, where ground truth observations show a fault condition, but FDD indicates normal condition;
* Confusion, where ground truth observations show one fault condition, but FDD determines another. According to the previous study [11], the accuracy of testing declines overall when the imbalance ratio of the dataset increased in the case of binary classification (normal or rotor fault/bearing fault). This means that the classification performance of these diagnosis methods was easily affected by the imbalance setting. For motor fault detection, which usually presents severely imbalanced data, misfiring and confusion from the classifier were more important than false alarms. In addition to increased classifier errors, the over-fitting phenomenon also resulted in poor accuracy for the test dataset, but good accuracy at the training stage. In the learning process, the adaptive moment estimation (Adam) optimizer was employed and tested using static and decaying \begin{table}
\begin{tabular}{l l} \hline \hline
**Category** & **Specification** \\ \hline CPU & Intel Core i7-7700K \\ RAM & 64 GB DDR4 memory \\ GPU & NVIDIA Titan XP 12 GB GDDR5X \\ OS & Ubuntu 16.04 LTS (Linux) \\ SW libraries & Python 3.4 / CUDA v8.0 / \\  & cuDNN v6.0 / Tensorflow r1.4 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Runtime environment details. Figure 6: Images of normal data under various conditions. Figure 7: Images of bearing fault data. (**a**) Contaminant, (**b**) outer high, (**c**) outer medium, (**d**) outer low, (**e**) inner high, and (**f**) inner medium. learning rates. The static learning rate was 0.0001 and the decaying learning rate was set as exponential decay from 0.0005 with 50% decay every 100 epochs (with a total of five decay steps in 500 epochs). The decaying learning rate performed better than the static learning rate, and the accuracy evolution of CBFD became weak at approximately 200 epochs. Therefore, for all further experiments, we determined hyper parameters, with the learning rate and terminal epochs being 50% decay from 0.0005 and 250 epochs, respectively. To verify the relationship between classification accuracy and data imbalance conditions, we performed two types of experiments: (1) training a model by fixing the number of normal data images to 20,000, which was close to the maximum size of the normal dataset shown in Table 1, and changing the ratio of the data imbalance from 30:1 to 1000:1; (2) fixing the number of normal data images to 10,000 and changing the ratio of data imbalance from 20:1 to 400:1. As the volume of normal data was larger than the volume of fault data, the number of normal data images was fixed and the ratio of data imbalance was changed. The test set for all conditions contained 300 randomly selected images for each category. To ensure robust results, we took the mean value of 10 trials for each data imbalance rate case as the final result. In the first experiment, the model was trained by fixing the number of normal data images to 20,000 and changing the ratio of the data imbalance. Figure 8a-c show the overall FDD accuracy and the numbers of misfirings and confusion for various imbalance ratios. No false alarms were observed, but the accuracy is declined and the numbers of misfirings and confusion are increased as the imbalance of the dataset becomes severe. However, the accuracy was still higher than 80%, even when the imbalance ratio was 1000:1.