## 2 Method for RUL Prediction
### AdaBoost Algorithm  
AdaBoost is an ensemble learning algorithm based on boosting strategy [36]. First, it updates the weights of each sample through continuous iteration and trains to form a learner with preliminary capabilities. Then, through a weighted linear combination, each base learner is integrated into a strong learner with mature capabilities. Whether it is updating sample weights or weighting in ensembles, the AdaBoost can adapt to the training error rate to ensure that samples with lower error rates or base learners have higher weights. The principle of AdaBoost is briefly introduced below.  
First, an initial weight vector is set such that each sample has an equal initial weight as follows.  
\[w_{i}^{t}=\frac{1}{n}\quad 1\leq i\leq n,t=1 \tag{8}\]  
Then, the base learner is used as a mapping \(h_{t}\), which \(t\) represents the number of iterations. The map is trained with the training set \(T\) and weight vectors and validated on the testing set. Among all the test samples, the value \(d_{t}\) with the largest error is  
\[d_{t}=\max_{i=1}^{n}|y_{i}-h_{t}(x_{i})| \tag{9}\]  
Since the key of AdaBoost is to redistribute weights to samples with large errors in the next iteration, the measurement of the error size should be compared with the largest error value in all samples. To describe the training error, the error needs to be normalized. Applying the exponential loss function, the adjusted error \(e_{i}^{t}\) of each instance is obtained as  
\[e_{i}^{t}=1-exp\bigg{(}\frac{-|y_{i}-h_{t}(x_{i})|}{d_{t}}\bigg{)} \tag{10}\]  
In the case that the structure of the CART learner and the training set remains unchanged, the size of these adjustment errors changes with the change of the weight vector. Therefore, the sum of the product of the sample weights and the corresponding adjustment errors can be used to measure the predictive performance of the mapping. The resulting value is the total error of the mapping:  
\[\varepsilon_{t}=\sum_{i=1}^{n}e_{i}^{t}w_{i}^{t} \tag{11}\]  
In general, the probability of a random judgment error is 0.5. Therefore, when \(\varepsilon_{t}\) is greater than 0.5, the iteration will stop. Confidence for this error is usually defined \(\beta_{t}\) as follows:  
\[\beta_{t}=\frac{\varepsilon_{t}}{1-\varepsilon_{t}} \tag{12}\]  
The lower the \(\beta_{t}\) is, the higher the reliability of the prediction made by the mapping. Utilize this value to update the sample weight vector as follows:  
\[w_{i}^{t+1}=\frac{w_{i}^{t}\beta_{t}^{1-\varepsilon_{i}^{t}}}{Z_{t}} \tag{13}\]  
where \(Z_{t}\) represents the normalization constant, which ensures that its sum is still 1 after the weights are reassigned. The whole iterative process is shown in Equations (9)-(13). The smaller the loss produced by the sample \(x_{i}\) in \(t\)-th iteration, the lower the weight of the next iteration will be. As the number of iterations increases, the learners focus on samples with larger errors by increasing the weight.  
The second weight adjustment occurs after the iteration stops, and all learners are weighted together. For a given input \(x_{i}\), each learner will make a prediction and get the result \(h_{t}(x_{i})\). Finally, using \(\ln(1/\beta_{t})\) as weights, the weighted median of all learner results is the total prediction \(h_{f}(x)\).  
Despite its predictive capabilities, the Adaboost algorithm presupposes that all training data is distributed identically. However, differences in operating conditions or battery types can result in variations between the distribution of historical datasets and those to be tested, ultimately leading to a decrease in RUL prediction accuracy.