## 3 Methodology
### PdM Time Slots Estimation Using ML  
To estimate the PdM time slots in the proposed framework, a ML software platform is used. Microsoft Azure software tool is used to construct the ML models where prediction takes place. Each model predicts a certain required aspect related to PdM using different ML algorithms. The flowchart of the PdM time slots estimation is shown in Figure 3.  
The models are then run using the uploaded machine health data and the results of each model are then reviewed to see which algorithm performed well enough to consider its results. If the results of each algorithm passes a predefined threshold, then comparison between the results of each model is done to determine which algorithm would be used to predict the required PdM aspect. After the best algorithm is chosen, its predicted data of the PdM time slots is then used in the DES model constructed in Section 3.1. Microsoft Azure is used to construct three models for PdM data. The first model is a regression model to predict the Remaining Useful Life (RUL) of a specific machine, the second model is a binary classification model to predict the time frame at which machine failure might occur in days and the final model is a multi-class classification model to predict when machine failure might occur in weeks. According to the flowchart in Figure 3, the data are first uploaded to Microsoft Azure after being prepared. Second, the software tool runs the models multiple times using different algorithms to determine the most accurate algorithm and required parameters to produce the best results. The results of each algorithm is scored and analyzed to determine if the results are deemed acceptable or not. If results analysis are acceptable, then the algorithms results are compared with each other to determine the best performing one, else, the data preparation process starts again to achieve better results. For each model, the software tool recommends specific set of parameters. These parameters are chosen according to the complexity of the case study and to avoid over-fitting which is the phenomenon that appears when trying to enhance the accuracy of the results by increasing or decreasing the variables. Over-fitting may cause deterioration in the accuracy of the results. One method to verify that the parameters values are optimum, it was suggested to manipulate them to see whether it would affect the results or not. Hence, the parameters for a specific algorithm have been used as is, doubled and reduced by half to generate three test cases. Therefore, three cases are tested for the parameters, the first case is the normal case and it uses the values for the parameters as they were given, we will call this the normal case in our study. The second case is the half case, and it uses half the values of the parameters of the normal case. The third and final case is the double case and it uses double the value of the parameters of the normal case. The results are evaluated based on two main criteria:  
Figure 3: Flowchart of PdM time slots estimation. the model run time and the values of the Root Mean Square Error (RMSE) and the Mean Absolute Error (MAE) for the regression model or accuracy and precision for the binary and multi-class classification models. The difference in the second evaluation criterion between the models is due to the difference of their output nature. For Regression models, the output is usually continuous and hence error is required to be calculated which is the deviation from the required output. In classification models, accuracy and precision are used since the output of classification models is discrete. The output of accuracy and precision values are presented between zero and one, with zero presenting zero percent and one presenting 100% while the MAE and RMSE values are presented between zero and one hundred percent. In the proposed framework, a simple hardware DAQ system is required for machine monitoring to collect data for the PdM models. The data are stored in a cloud-based service to be exported when needed.