# Bearing Fault Diagnosis Based on Vibration Envelope Spectral Characteristics
## 3 Method
### Naive Bayes Classifier  
The Naive Bayes method is a classification approach based on [PERSON] theorem and the assumption of conditional independence. It has good physical interpretability, and the diagnostic model is easy to implement. Compared to other classification algorithms, the Naive Bayes classifier is simple, robust to noise, has high parameter stability, strong overfitting handling capabilities, and boasts high learning and diagnostic efficiency. It requires very little storage space and has low computational cost [23]. By using it for fault diagnosis, the algorithm's complexity can be effectively reduced, diagnostic speed can be increased, the timeliness of real-time industrial bearing fault diagnosis can be enhanced, and hardware setup and operating costs can be minimized.  
The Naive Bayes classifier assumes that the feature variables are conditionally independent given the class and each feature variable. \(Y_{i}\) is only related to the class variable \(C\). Let \(U=\{Y_{1},Y_{2},\cdots,Y_{n},C\}\) be a finite set of discrete random variables, where \(Y_{1},Y_{2},\cdots,Y_{n}\) represent the fault feature variables, \(y_{i}\) denotes the value of the fault feature \(Y_{i}\), and the fault type \(C\) takes values from \(\{c_{1},c_{2},\ldots,c_{m}\}\).  
A faulty bearing sample \(X=\{y_{1},y_{2},\ldots,y_{n}\}\), where \(\{y_{1},y_{2},\ldots,y_{n}\}\) are the fault feature values. According to [PERSON] theorem, the probability that this sample belongs to the fault class \(c_{t}\) is  
\[p(c_{t}|y_{1},y_{2},\cdots,y_{n})=\frac{p(y_{1},y_{2},\cdots,y_{n}|c_{t})p(c_{ t})}{p(y_{1},y_{2},\cdots,y_{n})} \tag{4}\]  
Here, \(p(c_{t}|y_{1},y_{2},\cdots,y_{n})\) represents the posterior probability of predicting fault class \(c_{t}\), \(p(y_{1},y_{2},\cdots,y_{n}|c_{t})\) is the conditional probability of having fault feature values \(\{y_{1},y_{2},\ldots,y_{n}\}\) given fault class \(c_{t}\), \(p(c_{t})\) is the prior probability of fault class \(c_{t}\), and \(p(y_{1},y_{2},\cdots,y_{n})\) is the prior probability of fault feature values. The posterior probability reflects the impact of sample data on fault class \(c_{t}\).  
Since \(p(y_{1},y_{2},\cdots,y_{n})\) is constant for all fault classes, when \(p(y_{1},y_{2},\cdots,y_{n}|c_{t})p(c_{t})\) is maximized, \(p(c_{t}|y_{1},y_{2},\cdots,y_{n})\) is maximized. The prior probability is  
\[p(c_{t})=\frac{N_{c_{t}}}{N} \tag{5}\]  
where \(t=1,2,\cdots,m\); \(N\) is the total number of training samples for bearing faults. \(N_{c_{t}}\) is the number of samples in the training set belonging to the fault class \(c_{t}\).  
Figure 5: Peak extraction from envelope spectrum plots of **(a)** H, **(b)** BF, **(c)** IRF, and **(d)** ORF.  
On the premise of mutual independence among various fault characteristic values \(y_{1},y_{2},\ldots,y_{n}\), the conditional probability is defined as  
\[p(y_{1},y_{2},\cdots,y_{n}|c_{t})=\prod_{i=1}^{n}p(y_{i}\mid c_{t}) \tag{6}\]  
Here, \(p(y_{i}\mid c_{t})\) represents the conditional probability of fault characteristic value \(y_{i}\) under fault class \(c_{t}\), which can be calculated from the training samples as  
\[p(y_{i}\mid c_{t})=\frac{N_{c_{t}}^{y_{i}}}{N_{c_{t}}} \tag{7}\]  
Here, \(N_{c_{t}}^{y_{i}}\) represents the number of samples in the training dataset where fault class \(c_{t}\) and fault characteristic value \(y_{i}\) occur. If \(N_{c_{t}}^{y_{i}}=0\), then the probability is  
\[p(y_{i}\mid c_{t})=\frac{1/N}{N_{c_{t}}+N_{y_{i}}/N} \tag{8}\]  
The probability \(p(c_{t}|Y)\) that a fault sample belongs to a particular fault class \(c_{i}\) within fault type \(C\) can be obtained through Equations (4) to (5). If the probability of belonging to a certain fault class is maximum, then the bearing fault sample is classified into this particular bearing fault class.