## 2 Methods
### Random Forest  
Random forest (RF) was proposed in 2001 by [PERSON], an academician of the national academy of sciences. This algorithm is suitable for solving prediction and classification problems. RF integrates multiple weak classifiers and consists of many decision trees. Its output results are determined by voting principle according to the predicted results of each decision tree in the forest. The basic principle of RF is as follows:  
Assuming that the RF classifier is composed of multiple decision trees \(\left\{h_{j}(\mathbf{x},\Theta_{k}),k=1,2,\ldots,n\right\}\), \(\left\{\Theta_{k},k=1,2,\ldots,n\right\}\) stands for random vectors that are independent and identically distributed. The training sample set of the random forest classifier is expressed as \(\mathbf{D}=\left\{(\mathbf{x}_{1},y_{1}),(\mathbf{x}_{2},y_{2}),\ldots,(\mathbf{x}_{N},y_{N})\right\}\), where \(\mathbf{x}_{i}=\left(x_{i,1},\ldots,x_{i,p}\right)^{T}\) represents that the \(i\)th training sample \(\mathbf{x}_{i}\) has \(p\) eigenvalues, and \(y_{i}\) represents the corresponding label of training sample \(\mathbf{x}_{i}\). The training sample set \(\mathbf{D}\) is sampled for \(n\) times with Bootstrap, and \(n\) Bootstrap subsample \(\mathbf{D}_{j}(j=1,2,\cdots,n)\). For each subsample \(\mathbf{D}_{j}\), decision tree model \(h_{j}(\mathbf{x})\) (CART decision tree is generally used) is constructed, and finally a decision tree classifier composed of a group of decision trees \(\left\{h_{1}(\mathbf{x}),h_{2}(\mathbf{x}),\cdots,h_{k}(\mathbf{x})\right\}\) is obtained. For a new test sample, the category that gets the most votes through \(n\) decision trees is taken as the final category of the test sample. The classification decision is as follows:  
\[f(x)=\text{argmax}_{y}\sum\limits_{j=1}^{n}I(h_{j}(\mathbf{x})=y) \tag{8}\]  
where \(h_{j}(\mathbf{x})\) represents the \(j\)th decision tree, \(I(\cdot)\) is indicative function, that is, the value is 1 when this number is in the set, otherwise the value is 0, and \(y\) represents the target variable formed by category label \(y_{i}\).  
In the training process, the vibration signal sample set of rolling bearings under different states is used to extract the fault feature vectors that can establish the random forest classifier to identify the fault type of rolling bearings. In the testing process, the vibration signal of rolling bearings can be analyzed by the proposed fault diagnosis method, and the fault type and fault severity can be obtained. The main steps of proposed fault diagnosis method are as follows:  
In order to ensure the effectiveness of fault diagnosis methods, sufficient samples of rolling bearing vibration signals under different fault states should be collected. These vibration signals construct the vibration signal set.  
1. Set the scale factor \(\tau=1,2,\cdots,n\) of rolling bearings, and \(n\) coarse-grained vibration signals are obtained for each vibration signal in the set.
2. For each coarse-grained vibration signal, calculate \(n\) amplitude-aware permutation entropy values to construct the fault feature vector.
3. The fault feature vector set is constructed by the fault feature vectors extracted by Step (3).
4. The random tree classifier is established by the fault feature vector set.
5. The testing vibration signal can be analyzed by the proposed method and get the fault type and fault severity of rolling bearings.  
Figure 2: The principle diagram of proposed fault diagnosis method for rolling bearings.