## 7 Conclusions and Future Works  
This paper provides a methodology to preprocess time series data related to fault components of one of the systems of the SARAS company (oil and gas sector) aiming at implementing a machine learning model to predict the next failure date of each component of such a system. We performed a data cleaning step to fill in several of the missing information within the raw data. This phase has been performed together with ITALTEECO, a company partner of SARAS, which provided us with the necessary information to rebuild some of the technical sites needed for the prediction step. Then, we identified the category of the monitored faults for each component through natural language processing and clustering techniques. An accurate analysis of the registered failures led to the identification of 19 fault categories, and, for each of them, an unique identifier i.e., the notice, was assigned. Then, we tried to predict the next fault occurrences for each component. This has been mapped as a regression problem where the number to predict corresponded to a date (number of days elapsed from 31/12/1999). Three different machine learning models have \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Number of Samples** & **Average Error LR** & **Average Error ARIMA** & **Average Error PI** \\ \hline
10 & 591.69 & 393.17 & 360.58 \\ \hline
21 & 387.74 & 169.51 & 181.64 \\ \hline
43 & 386.17 & 84.11 & 94.09 \\ \hline \hline \end{tabular}
\end{table} 
Table 15: Global errors \(\mathbb{E}_{c}^{M}\) for different values of \(c\). \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Sample Length** & **\#Components with \#Samples** & **Average Error** & **Average Error** & **Average Error** \\  & **Defined in the First Column** & **LR** & **ARIMA** & **PI** \\ \hline
16 & 3 & 747.45 & 788.68 & 616.79 \\ \hline
17 & 8 & 784.69 & 501.16 & 504.10 \\ \hline
18 & 5 & 1141.74 & 762.67 & 745.30 \\ \hline
19 & 3 & 942.11 & 1075.2  
been used to tackle the regression problem. Time series data of notices were used to train each model, and the performances of each model have been analysed. To support machine learning models in making reliable predictions, it is important to make sure there are enough complete data. One of the most problematic parts of our work was related to the reconstruction of missing information. The following issues were found among the data and have been highlighted:  
* incorrect compilation of a description where several different components were often inserted;
* an incorrect compilation of the component names, i.e., the component names in the description are often named without the RT2 prefix or the last word indicating the real part of the component subject to a maintenance event;
* lack of important data such as downtime that would have been useful to try to predict data related to lost production;
* the component map provided was not complete and therefore it was not possible to recognize some components and reconstruct their technical locations. To solve some of these problems, natural language processing techniques were used to recognize components using only parts of their name. In this way, if a word in the description contained a mapped component, it has been recognized, and, consequently, it has been possible to reconstruct the technical location of the relevant warning. Regarding the data on downtime and maintenance costs, nothing could be done to reconstruct them. The only action was to provide feedback to the company showing them the importance of including this type of information in future actions. One of the best practices that come from our analysis is to start collecting data using a schema defined at the beginning of the collection process or to set up a system capable of acquiring data directly without having to post-process them by hand. This would bring the following advantages:  
* No pre-processing of the initial data;
* Better data quality;
* Better performance of the predictive models.