## 3 Data Collection and Preparation
### Data Preprocessing  
As illustrated in Figure 7, the data preprocessing procedure implemented to ensure optimal quality of the data consisted of five steps: (i) filtering, (ii) outlier removal, (iii) data smoothing, and (iv) segmentation. A detailed description of the three first steps is presented in [30].  
According to the procedure described above, two indicative filters are illustrated in Figure 8, with observations lying in the red regions being discarded. Furthermore, in Figure 9, the outlier removal procedure is illustrated, removing extreme values of the fuel oil consumption and exhaust gas temperature at cylinder 1, concerning the main engine's rpm as a primary parameter, with the samples in orange being discarded, whereas the remainder of the data points appears in blue. Furthermore, regarding the signal smoothing for this study case, it was determined that the 15 min averaging window was adequate, removing most of the noise while also managing to limit the information loss and being  
Figure 6: Sources of collected data and the respective features.  
Figure 7: Outline of the study.  
capable of following local trends satisfactorily. Figure 10 depicts the smoothed signal as produced by the SMA algorithm contrasted with the original, much more volatile signal.  
As a final step, the samples fed into the network must be converted into time series batches. They were generated by segmenting the initial dataset by using a specific time window. In our study, to generate more samples, overlapping between adjacent samples was applied; the overlap percentage was kept at a constant value. The essence of the time window dictates the amount of information depicted by one time series batch, through the period to which it is referring. In our study case, the 1D convolutional model was used to inspect the temperature of the six cylinders of the main engine in an attempt to identify suspicious patterns indicating failure. Indicative time series for the average among the six cylinders are shown over 8 h (Figure 11). After performing dataset segmentation, in this instance, the finalized dataset array containing the samples could be perceived as a 3D  
Figure 8: Visualization of filters applied to RPM and ship’s velocity variables.  
Figure 10: Real (blue line) vs. smoothed (red line) signal obtained with a 15 min averaging window.  
Figure 9: Outlier removal relative to main engine rpm. (**Left**): Fuel Oil Consumption (FOC); (**Right**): exhaust gas temperature of cylinder 1.  
array, whose first dimension refers to the number of available input batches, the second dimension refers to the number of time points that each time series sample contains, and the third dimension equaling the number of features per batch, namely the temperature of the six inspected cylinders.  
Finally, after experimentation, data normalization was found to improve dramatically the performance of our models. The normalization algorithm implemented on this occasion was the Standard Scaler from the Scikit-Learn Library, which is expressed as follows:  
\[z=\frac{(x-\mu)}{s} \tag{4}\]  
where \(\mu\) and \(s\) is the sample mean and the sample standard deviation for the measurements of each standardized variable