# On Training Data Selection in Condition Monitoring Applications--Case Azimuth Thrusters
## 2 Materials and Methods
### Training Subset Selection
#### 2.1.1 Dataset Segmentation  
The training subset selection process identifies the widest acceptable operating ranges, based on shaft rotational speed, without any overlap between each other. To have an acceptable range, the residual sets must be normally distributed in the data, as shown in [6]. A single residual set refers to the differences between the values of a feature and its predicted values by linear regression fitted on the training subset, see Equation (1).  
In our previous work [6], the distribution of shaft speed values was divided into 55 ranges based on the deciles so that all the values between the minimum and maximum of the dataset were used. In this work, this approach is termed 'basic training subsets'. The minimum number of samples that are accepted within a range (or subset) was set to 10% of the sample size (N) of the dataset in the tests presented here.  
Additionally, a new approach was proposed, where the distribution of shaft speed values was segmented into 4851 separate ranges, based on percentiles. The values from the 1 st to 99 th percentile were processed so that the candidate ranges were one percentage point wide at minimum and 98 percentage points at maximum (namely, the interval between the 1 st and 99 th percentiles). The first range covered values between 1 st and 2 nd percentiles, the second covered values between 1 st and 3 rd percentiles, the third covered values between 1 st and 4 th percentiles and so forth. The lower end of ranges consisted of 1-98 th percentiles and the upper end consisted of 2-99 th percentiles.  
However, the proposed approach may result in impractically narrow ranges, and therefore, the minimum width (in rpm) was introduced as another user-defined parameter to guide the speed range selection. The minimum width was set to 5 rpm and the narrower ranges were then removed from the full set of ranges (4851 ranges). Furthermore, the ranges were required to include at least 40 samples to be accepted. Consequently, the number of subsets considered was different for each complete training set. This approach is termed 'adaptive training subsets' to describe its dense segmentation of distribution and high flexibility compared with the previous approach. The main differences between the approaches to dataset segmentation are summarized in Table 2.  
Figure 2 illustrates the candidates for shaft speed ranges with one training set (N = 3000) that is later introduced in Section 2.2. 'Basic training subsets' approach is shown on top in Figure 2, whereas 'adaptive training subsets' is shown below. The plot on top shows that in the case of a skewed distribution with many samples, the adjacent candidate ranges may have large differences in the boundary values with 'basic training subsets' approach. For example, the lower value of the candidate ranges jumps from 239 rpm to 343 rpm when the lower end shifts from the 20 th to 30 th percentile (see ranges 11-27). The plot below illustrates that 'adaptive training subsets' approach with thousands of candidate subsets introduces more flexibility to the range selection due to the higher resolution.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Basic Training Subsets** & **Adaptive Training Subsets** \\ \hline Number of subsets & 55 & \(\leq\)4851 \\ Distribution range in use (in & 0–100 & 1–99 \\ percentiles) & 10 & 1 \\ Minimum range width (pp) & - & 5 \\ Minimum number of samples & 0.1 \(\times\) N (rounded to integer) & 40 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Applied parameter values in dataset segmentation approaches. Parameter N is the number of samples in complete training set.