## 3 Methodology
### Hybrid Prediction Model for Fault Detection  
In this study, the hybrid prediction model is utilized to predict whether the process is functioning normally or abnormally. Figure 4 shows the process of detecting normal or abnormal events during the manufacturing process. The hybrid prediction model utilizes an outlier detection based on DBSCAN to detect and remove outliers from the sensor data and a Random Forest-based classification model to predict normal and abnormal events. Finally, the performance is evaluated by comparing the hybrid prediction model with other classification models. \begin{table}
\begin{tabular}{c c} \hline
**Specification** & **Information** \\ \hline Gyroscope & Gyroscope sensor (accurate to \(\pm\)245/500/2000 degrees per second) \\ Accelerometer & Accelerometer sensor (accurate to \(\pm\)2/4/8/16 G-forces) \\ Magnetometer & Magnetic Sensor (accurate to \(\pm\)4/8/12/16 gauss) \\ Barometric pressure & Pressure sensor (accurate to \(\pm\)0.1 hectopascal) \\ Temperature & Temperature sensor (accurate to \(\pm\)2 \({}^{\circ}\)C) \\ Humidity & Relative humidity sensor (accurate to \(\pm\)4.5\%) \\ Display & 8 \(\times\) 8 LED display matrix \\ Input & Small 5 joystick button \\ \hline \end{tabular}
\end{table} 
Table 2: Detailed specifications of Sense-HAT. Figure 3: The real-case implementation of the proposed IoT-based sensor in an assembly line. \begin{table}
\begin{tabular}{c c} \hline
**Specification** & **Information** \\ \hline RAM & 1 GB \\ CPU & Quad Cortex A53 @ 1.2 GHz \\ GPU & 400 MHz VideoCore IV \\ GPIO & 40 pins \\ Storage & Micro-SD \\ Ethernet & 10/100 Mbps \\ Wireless & Wireless LAN 802.11m/Bluetooth 4.0 Low Energy \\ USB & 4 ports \\ Power consumption & 5 V \\ Dimensions & 85.60 \(\times\) 56.5 mm \\ \hline \end{tabular}
\end{table} 
Table 1: Detailed specifications of Raspberry Pi 3 model B. For the performance evaluation of various prediction models, the dataset was collected from experiments in a lab in which the IoT-based sensor was installed. The collected dataset consisted of 342 instances, which were classified as normal or abnormal events during the manufacturing process. The dataset contained eight features: (1) temperature (\({}^{\circ}\)C), (2) humidity (% relative humidity/rh), (3) the X value of the accelerometer, (4) the Y value of the accelerometer, (5) the Z value of the accelerometer, (6) the X value of the gyroscope, (7) the Y value of the gyroscope, and (8) the Z value of the gyroscope. The dataset consisted of 102 data points labeled as \"yes\" and 240 labeled as \"no\". A \"yes\" class indicates an abnormal event occurred while a \"no\" class means an abnormal event did not occur during the manufacturing process (normal). In addition, the collected training dataset (342 instances) was labeled based on the possible combination of fault events during assembly line process in automotive manufacturing. The machine learning methods are expected to learn and generate the robust model/classifier from collected dataset. Once the model/classifier is generated and installed into monitoring system, the prediction result from real-time IoT-based sensor data can be presented. Once the dataset was collected, data preprocessing was performed by removing inappropriate, inconsistent, and missing-value data. Table 3 shows the dataset distribution for the mean and standard deviation of each class. Furthermore, in order to analyze the significance of the features, the Information Gain (IG) technique was applied [72]. Weka version 3.6.15 software was utilized to evaluate the significance of the features with IG [73]. The dataset attributes and their IG scores are presented in Table 4. The results show that temperature is the greatest factor that affects abnormal events during the manufacturing process. \begin{table}
\begin{tabular}{c c} \hline \hline
**Feature** & **IG Score** \\ \hline temp & 1.0504 \\ ay & 0.97 \\ gy & 0.9249 \\ hum & 0.8719 \\ gz & 0.8471 \\ gx & 0.6324 \\ az & 0.4899 \\ ax & 0.4663 \\ \hline \hline \end{tabular}
\end{table}