## 2 Materials and Methods
### Predictive Maintenance Techniques  
The algorithms evaluated for anomaly detection are principal component analysis (PCA) [26], extreme learning machine (ELM) [27], one-class support vector machines (OC-SVM) [28], an autoencoder based on 2-dimensional convolutional neural networks (2D-CNN-AE) [29], and null space [30]. The parameters for training all mentioned models are contained in Table 3, whereas the architecture of 2D-CNN-AE and its details are presented in Figure 4. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
\begin{tabular}{c} For transfer learning \\ \end{tabular} & Synthetic failure & 0 & 55 (5 for each type) & 137 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Number of strokes available for training, validation and testing in anomaly detection and adaptability experiments. The indication “for each type” refers to each of the synthetic failure types and their magnitude combinations, which consists of 11 types. Figure 3: A sample of stroke question in the questionnaire for domain technicians. The PCA, ELM, and OC-SVM algorithms have been executed in two ways. The first was training and performing predictions for strokes' evolution variables, setting a threshold on the loss using percentile, and then counting the number of cycle samples surpassing the threshold and setting another threshold on this number to determine if that stroke sample is anomalous or not. The other way was to extract statistical features for each sensor variable and then perform anomaly detection in these features with a percentile threshold. The extracted features were mean, variance, maximum, and minimum values. Null-space and 2D-CNN-AE use evolution variables as input, not requiring specific feature extraction. The input of 2D-CNN-AE has been formatted to batchxnum_cyclesx12x1, where batch refers to a group of strokes, num_cycles are the observations of each input variable, 12 are the input variables, and the last dimension indicates that each stroke has one dimension and it is required by the library to perform 2D convolutions. For diagnosis by isolating failures on latent space features, _t_-SNE [31] was used for visualization of latent space variables; ordering points to identify the clustering structure (OPTICS) [32] algorithm as a density-based clustering algorithm; gaussian mixture models (GMM) [33] as parametric clustering algorithm; and SOM [34] to project data in a new space based on competitive learning. Based on a literature review of clustering algorithms, these are the reasons for selecting each algorithm. GMM enables the parametrization with  
Figure 4: Architecture of 2D-CNN-AE and its parameters. \begin{table}
\begin{tabular}{l c} \hline
**Anomaly Detection Model** & **Training Parameters** \\ \hline PCA cycle & num. components = 90\%; loss func. = RMSE \\ PCA trad. feats & num. components = 90\%; loss func. = RMSE \\ ELM cycle & h\_dim = 10; target = 1; loss func. = absolute diff. \\ ELM trad. feats & h\_dim = 10; target = 1; loss func. = absolute diff. \\ OC-SVM cycle & kernel = rbf; kernel coef. = 1/n\_features; nu = 1\% \\ OC-SVM trad. feats & kernel = rbf; kernel coef. = 1/n\_features; nu = 1\% \\ Null-space & \multicolumn{2}{c}{alpha = 5; beta = 5} \\  & Input dim: batchxnum\_cyclesx12x1 \\  & 2 FE layers of 2D CNN\&maxpool\&rleu\&flatten\&FFNN \\
2D-CNN-AE & optimizer = adam (Ir = 0.001, betas = (0.9, 0.999), eps = 1 \(\times\) 10\({}^{-8}\)) \\  & & early stopping, patience = 2 \\  & & train loss = MSE; loss func = RMSE \\ \hline \end{tabular}
\end{table} 
Table 3: Parameters for training anomaly detection models. Cycle and trad. feats refer to the way anomaly detection models prepare and process the data. number of clusters, which is not required for anomaly detection but is a requirement for diagnosis. With the objective to enable a less strict clustering, OPTICS has been selected to cluster the space based on density, which has the additional advantage of grouping outlier instances in another group.