# Bearing Fault Diagnosis Based on Improved Convolutional Deep Belief Network
## 2 Theoretical Background and Proposed Method  
### Restricted Boltzmann Machine  
DBN is composed of several restricted Boltzmann machines (RBMs). The definition of the RBM model is based on the energy function. It is a basic component of DBNs and a key preprocessing unit in deep learning [17]. RMB is a basic single-layer machine learning network and has extensive applications. The formulas involved in the following text refer to the study of [PERSON] and [PERSON] [17]. As shown in Figure 1, an RBM structure has two layers, namely, visible and hidden layers. A connection exists between each neuron node in the adjacent layer, and in each layer, the neuron nodes remain in a connectionless state with each other. The connection weight between two layers is \(W\). RBM neurons are Booleans, implying that only two states exist, 0 and 1. State 1 indicates the activation of a neuron, and state 0 indicates suppression. In a way, for a given visible and hidden layer neuron in a binary state, the energy function of the RBM is as follows:  
\[E(v,h;\theta)=\sum_{i=1}^{n}a_{i}v_{i}-\sum_{i=1}^{n}\sum_{j=1}^{m}w_{ij}v_{i}h _{j}-\sum_{j=1}^{m}b_{j}h_{j} \tag{1}\]  
where \(\theta=\left\{W_{ij},a_{i},b_{j}\right\}\) is the parameter set of RBM, \(w_{ij}\) denotes the weight of the \(i\)th cell in the visible layer and the \(j\)th cell in the hidden layer, \(a_{i}\) denotes the offset of the \(i\)th unit of the visible layer, \(b_{j}\) denotes the offset of the \(j\)th cell of the hidden layer, \(v_{i}\) is the state of the \(i\)th unit in the visible layer, and \(h_{j}\) is the state of the \(j\)th unit in the hidden layer.  
After the parameters are determined, the joint probability distribution of (\(v\),\(h\)) is exported by Formula (1), where \(Z(\theta)\) represents the normalized constant.  
\[P(v,h;\theta)=\frac{1}{Z(\theta)}e^{-E(v,h;\theta)} \tag{2}\]  
\[Z(\theta)=\sum_{v,h}e^{-E(v,h;\theta)} \tag{3}\]  
Figure 1: Structure of restricted Boltzmann machine.  
From the joint probability distribution, the edge probability and the conditional probability of visible and hidden neurons are driven by Formulas (4) and (5), respectively:  
\[\begin{array}{l}P(v;\theta)=\frac{\sum\limits_{k}e^{-E(v,k\theta)}}{\sum \limits_{k}e^{-E(v,k\theta)}}\\ P(v|\mu;\theta)=\frac{e^{-E(v,k\theta)}}{\sum\limits_{k}e^{-E(v,k\theta)}}\\ \\ P(h;\theta)=\frac{\sum\limits_{v}e^{-E(v,k\theta)}}{\sum\limits_{k}e^{-E(v,k \theta)}}\\ P(h|v;\theta)=\frac{e^{-E(v,k\theta)}}{\sum\limits_{k}e^{-E(v,k\theta)}}\\ \end{array} \tag{4}\]  
Given a visible neuron and a hidden neuron state, the probability of activating the \(j\)th hidden neuron and the \(i\)th visible neuron are respectively provided as follows, where \(\sigma=1/(1+e^{-x})\):  
\[\begin{array}{l}p(h_{j}=1|v;\theta)=\frac{\sum\limits_{h_{j}}p(h_{j}=1,h_{k_{ j}};v;\theta)}{\sum\limits_{k}p(h,v;\theta)}\\ =\sigma(\sum_{i=1}^{n}w_{ij}v_{i}+b_{j})\\ \\ p(v_{i}=1|h;\theta)=\frac{\sum\limits_{k_{i}}p(v_{i}=1,v_{i},h_{i},v;\theta)}{ \sum\limits_{p(v,k\theta)}}\\ =\sigma(\sum_{j=1}^{n}w_{ij}h_{j}+a_{i})\\ \end{array} \tag{6}\]  
The contrast divergence algorithm [18] is used in RBM during model training. The task of training RBM is to find the optimal value of parameter \(\theta\) so that the edge probability of the visible neurons in the distribution represented by RBM is maximized; that is, the goal is to maximize the log-likelihood function.  
\[\theta^{*}=\underset{\theta}{\text{argmax}}\sum\
olimits_{v}\ln P(v;\theta) \tag{7}\]