# An EWS-LSTM-Based Deep Learning Early Warning System for Industrial Machine Fault Prediction
## 4 The Case Study Phases and Results
### Exploratory Data Analysis  
This step of the study involved the analysis of the data from the sensors; the dataset had a \(Timestamp\) range from 1 January 2023 to 1 June 2023. Due to the nature of data collection and conversion, no constant \(\Delta t\) [s] was identified that consistently separates the \(Timestamp\) of a single dataset row from the next. A simple statistical analysis revealed that \(min(\Delta t)=1\) [s], \(max(\Delta t)=3\) [s] and \(avg(\Delta t)=1.3\) [s]. Since a 1:1 correspondence between the \(Timestamps\) of the dataset rows could not be established, time will be expressed in terms of time units (TU) instead of seconds. The TU represents the unit step between consecutive rows, independent of the actual time elapsed. Furthermore, no further investigation was conducted on the trend of \(Timestamp\), as it will be used only as an index to better represent the data. Exploratory Data Analysis (EDA) began with a simple plot illustrating the trend of all features over time. This initial step provided a clearer understanding of their behaviour, revealing that 5 of the 34 features maintained a constant trend throughout the time frame. As a result, these features were removed from the dataset and excluded from further analysis. Subsequently, to gain deeper insight into the domain of each feature, a random forest analysis was performed using the Mean Decrease Impurity metric (MDI), as shown \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Timestamp** & **Feature 1** & **Feature 2** & **\(\dots\)** & **Feature n** \\ \hline \(t-2\) & t & y & \(\dots\) & z \\ \hline \(t-1\) & t & y & \(\dots\) & z \\ \hline t & t & y & \(\dots\) & z \\ \hline \(t+1\) & x & v & \(\dots\) & z \\ \hline \(t+2\) & x & v & \(\dots\) & z \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The application of the backward fill to the forward-filled table moves the value of \(y\), \(z\) back in time. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Timestamp** & **Feature 1** & **Feature 2** & **\(\dots\)** & **Feature n** \\ \hline \(t-2\) & t & null & \(\dots\) & null \\ \hline \(t-1\) & null & y & \(\dots\) & null \\ \hline \(t\) & null & null & \(\dots\) & null \\ \hline \(t+1\) & x & v & \(\dots\) & null \\ \hline \(t+2\) & null & null & \(\dots\) & z \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The initial status of the table. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Timestamp** & **Feature 1** & **Feature 2** & **\(\dots\)** & **Feature n** \\ \hline \(t-2\) & t & null & \(\dots\) & null \\ \hline \(t-1\) & null & y & \(\dots\) & null \\ \hline \(t\) & null & null & \(\dots\) & null \\ \hline \(t+1\) & x & v & \(\dots\) & null \\ \hline \(t+2\) & null & null & \(\dots\) & z \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The application of the forward fill to the original table moves the values of the variable \(x\), \(y\), \(t\) forward in time. in Figure 1. The data exhibit significant variability, primarily due to the machine's inherent nature, which frequently transitions between different states, along with occasional outliers observed during maintenance operations. Further investigations were conducted by analysing the correlation matrix between features and classes, revealing that an additional 14 variables exhibited identical correlation patterns. Discussions with domain experts confirmed that these values came from closely positioned sensors, allowing a further reduction in the number of features by retaining only one representative variable per group. The final set of selected features, along with their correlation values, is presented in Figure 2, which highlights a refined selection of the 21 features of the original 34 (excluding the target class). Additional studies in the domain of each feature did not show evidence of seasonal and residual values. Furthermore, the autocorrelation with the target class, as well as the partial autocorrelation of each feature, did not show a strong relationship.