# A Machine Learning Framework for Condition-Based Maintenance of Marine Diesel Engines: A Case Study
## 2 Predictive Maintenance
### A Bird's-Eye View of Prediction Models  
Data-driven models have been widely investigated in the literature and applied to different diagnosis problems. They can be used as classifiers and as predictors. In both cases, the aim is to answer three fundamental maintenance questions:  
1. Will there be a failure or fault?
2. Where will the failure or fault be?
3. When will the failure or fault occur?  
Answering all the questions is necessary to apply the PdM in a good way. In fact, it is possible to know which component to maintain and when the failure or fault is predicted to occur. Focusing the attention on the maritime sector, anticipating a failure occurrence may allow the ship owner to manage the maintenance and order the spare parts. The difference between classifiers and predictors is the way in which they are applied.  
A classifier is trained to compare new data with data from the different engine behaviors it was trained on. Then, it assigns a score to each comparison, and finally, outputs the behavior with the highest score that matches the data best. Examples of PdM by classification are given in [32; 48; 49].  
On the contrary, predictors are trained to predict the expected values of engine variables. They are then compared with the outputs from the real asset. An example is given in [50], where an artificial neural network (ANN) evaluates the expected values of parameters that are identified as failure indicators. It is remarked that finding failure indicators is decisive in diagnostic and prognostic models. In fact, reducing the computational cost is important to realize an intelligent diagnostic tool that could be installed onboard. For that reason, as concluded by [51], modeling and simulation can be used to overcome the poor availability of faulty data. Synthetic data produced by simulation make it possible to compare healthy with faulty behaviors, hence to find the most suitable failure indicators. Other neural networks were implemented in [52; 53]. Moreover, random forests can be applied for maintenance purposes [49; 54], and finally, some authors propose the application of so-called ensemble neural networks [55; 56].  
In this innovative context, the main research gap is that frequently it is not well explained how the algorithms used for diagnostic purposes are chosen, which may affect the predictive maintenance success and cost, as also discussed in Section 1.3. To provide a more robust motivation and prevent unreliable predictions, some authors propose a benchmarking between algorithms, as shown in [22; 31], but neither of the mentioned two analysis techniques are definitively the best choice for predictive maintenance. For that reason, the aim of this work is to propose an easy-to-use framework to select the best algorithm for an initial stage of CBM implementation in marine industrial settings. A procedure is developed to easily find the best algorithm for each component of the system that is subject to faults and is fundamental for a marine engine's operation. In all cases, the procedure marks the best algorithm. The novelty of the current study is to realize an effective comparison by the response time and the prediction error, and by a formula evaluating a performance index that weights the two previous time and error indexes. In the authors' opinion, these two indexes are the most suitable ones to evaluate the performance of a predictive algorithm. It is remarked that, differently from [31], the authors also consider the time variable, which is crucial for maintenance purposes.  
Finally, once all the components have been analyzed, the algorithm which is marked the most number of times is chosen as the predictive algorithm to be used in the online monitoring system.