## 3 Methodology
### Quantile Regression of Temporal Convolution Network (TCNQR)  
Based on the results of literature [27], TCN has faster prediction speed and higher prediction accuracy. In this paper, quantile regression (QR) was combined with TCN, and the RUL probability density prediction of bearings was realized based on the optimal DI construction method.  
The optimization problem of quantile regression (QR) will be introduced into the TCN to realize the bearing RUL probability density prediction. By optimizing the following objective function, the parameters of the TCNQR model are estimated.  
\[Y_{i}=g(X_{i},W,b) \tag{14}\]  
\(X_{i}\) is the input data constructed by the above DI construction method. The RUL prediction can be expressed as \(Y_{i}^{p}=g(X_{i},\hat{W},\hat{b})\), \(\hat{W}\) and \(\hat{b}\) are the optimal estimate of the weight parameter and the bias parameter.  
The essence of TCN is the optimization of CNN for time series problems. By adjusting parameters such as convolution kernel, number of convolution layers and expansion coefficient, the global perception of sequence data with specified length is realized, it can be expressed as:  
\[F(s)=(X*f)(s)=\sum_{i=0}^{o-1}f(i)\cdot X_{s-d\cdot i} \tag{15}\]  
where, \(X\) is the input time series; \(*\) is the convolution operation; \(o\) is the size of the convolution kernel; \(d\) is the dilation factor; D is the expansion coefficient.  
Further, in order to simplify the calculation of parameters and accelerate the convergence speed of the algorithm, TCN rewrited the weight parameter \(W\) as a joint representation of modulus \(m\) and direction \(V\) through weight normalization [27], as shown in Equation (16).  
\[W=\frac{m}{\|V\|}V \tag{16}\]  
To avoid too much information loss in the process of feature extraction, TCN replaces the convolutional layer with the residual block, and the input data passes through \(1\times 1\) convolution processing, reaches the specified dimension, it is added with the feature data extracted by the dilated causal convolution [27] to serve as the final output of this layer. As shown in the Figure 4, the two dilated causal convolution layers and their corresponding weight normalization, spatial dropout [35] (which added after each dilated convolution for regularization), activation function and residual connection link, and finally formed a new residual block, which is the basic unit of deep TCN.  
In this paper, combining the QR theory and TCN algorithm, Quantile Regression of temporal convolution network (TCNQR) algorithm is proposed for bearings RUL prediction problem. The QR loss function is as follows:  
\[Loss=\underset{W,b}{min}\sum_{i=1}^{N}\rho_{\tau}(Y_{i}-Y_{i}^{p})= \underset{W,b}{min}\sum_{i|Y_{i}\geq g(X_{i},\hat{W},\hat{b})}\tau|Y_{i}-g(X_{i },\hat{W},\hat{b})|\] \[+\underset{W,b}{min}\sum_{i|Y_{i}<g(X_{i},\hat{W},\hat{b})}(1- \tau)|Y_{i}-g(X_{i},\hat{W},\hat{b})| \tag{17}\]  
The value range of \(\tau\) is 0 to 1. Through constant optimization and adjustment of \(W\) and \(b\), equation (17) can be minimized. In TCNQR, equation (14) is rewritten as:  
\[\hat{Q}_{Y}(\tau\mid X)=g(X,\hat{W}(\tau),\hat{b}(\tau)) \tag{18}\]  
where \(\hat{Q}_{Y}(\tau\mid X)\) is the optimal estimate of \(Y\) when input data is \(X\) in the case of determining quantile \(\tau\).