# Prediction of Machine Inactivation Status Using Statistical Feature Extraction and Machine Learning
## 3 The Proposed Method
### Features Extraction Using Statistical Analysis
#### 3.2.2 MSTV Features  
To distinguish the active and non-active patterns of the machine more effectively, we proposed a method to combine various essential factors from the raw dataset related, i.e., the alarm duration (AD), machine state duration (MSD), continuous good product (CGP), and continuous NG product (CNP) to extract new features that can learn the machine's behavior during operation. We call these features an MSTV. Figure 6 shows the architecture of the proposed feature extraction.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Feature** & **Description** & **Data Type** \\ \hline Time Between Non-active States & Time elapsed between non-active states & Int \\ Weibull Distribution & & Float \\ Lognormal Distribution & Probability of non-active states occurring during machine operation & Float \\ Exponential Distribution & & Float \\ \hline \hline \end{tabular}
\end{table}
Table 2: Reliability Feature Extraction.  
Figure 5: Result of exponential distribution results.  
Figure 6: Architecture of proposed feature extraction.  
[PERSON] et al. [27] proposed the detection of significant arms using outlier detection algorithms, which indicated the importance of alarm for tracking the behavior of a machine, particularly during the occurrence of an unusual event. Hence, in this experiment, we retrieved the AD during operation as a combined feature for extracting the new useful feature. Meanwhile, the machine duration (MD) provided beneficial information for verifying the behavior of the machine because it indicated the time required by the machine to change from one state to another. Recall from Section 3.1 that a machine can have the following 5 states: Run, wait, stop, offline, and manual, among which run and wait were considered as active states, and stop, offline and manual were considered as non-active states. The CGP means the number of high-quality products produced. The CNP was the quantity of poor-quality products produced.  
Based on these 4 features, we define \(MSTV\) as follows:  
\[MSTV=\Sigma(AD\times w1+MSD\times w2+CGP\times w3+CNP\times w4)\times\frac{1}{ n}, \tag{7}\]  
In Equation (7), \(w1\), \(w2\), \(w3\), and \(w4\) are weight values assigned to each factor, respectively. Here, the weight values indicate the importance of the factors that influence the non-active state of the machines. In this case, the importance was determined through discussions with the operators in the factory, and the most important factors were determined as the MSD, followed by the AD. Next was the number of normal products continuously and the number of abnormal products continuously produced by the machine. In consideration of these factors, in this paper, weights were given as 2, 3, 1.5, and 1, respectively.  
Figure 7 shows the results of MSTV feature extraction. In Figure 7, the \(x\)-axis indicated the elapsed time (in minutes) from which the machine was active, and the \(y\)-axis indicated the probability of a non-active state of the machine obtained using MSTV in Equation (7). From the figure, we can observe that if the value was close to 0 (indicated in red rectangles), the probability of non-activation increased. On the other hand, we can see that the active state (green rectangle) occurred as the probability curve of MSTV goes higher. As shown in Figure 7, after employing the proposed feature extraction approach to extract the MSTV, the patterns of the active and non-active states of the machine can be distinguished well by combining 4 indispensable elements from the raw dataset to extract new utilitarian features.