## 4 The Application of AWS Machine Learning (AML) for the Surface Finishing Process
### Amazon Web Services Machine Learning (AML)--General Overview  
In this paper, the AML functionalities and APIs for the chamfer length prediction in the deburring process are presented. Prior to the AML platform application, the vibration features of the deburring process must be predetermined. The measured chamfer length is also needed as the target prediction of the training process in order to build the prediction model. The detail of the developed feature based on WPD and Welch is presented in our previous study [11]. The AWS client provides APIs for users to build and to evaluate the machine learning models. Once we have designed a model that is capable of chamfer length predictions, we will build an infrastructure to communicate between the AML and the chamfer length prediction application in a dynamic chart. The infrastructure will consist of a webpage, a server, sensors, and the machine learning application. The Javascript and PHP scripts will be used to automate the process of sending the new data to the server, communicating with the AML client to request for the predictions, storing the prediction data, and presenting the predictions on the webpage.  
The first part of our problem is confirming if the machine learning model created by the AML client is able to predict the target output at within a certain degree of accuracy. Using the selected feature, we will create a machine learning model and utilize the service functionality on the AWS to evaluate its performance. After some assessments, we will determine whether the features have a linear correlation to the target output.  
The second part of our problem is integrating the AML into our database and webpage in order to achieve real-time data visualization. We will first create an application to work with the AML client in order to generate predictions from the machine learning model. We will make use of the SDK provided by the AWS to call upon a real-time prediction end-point based on the AWS APIs and output the predictions into our database. Next, we will connect the database to our webpage and create a script to automatically update the chart with prediction data in real-time.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Pass** & \multicolumn{3}{c}{**Accelerometer Axis**} & \multicolumn{2}{c}{**Chamfer**} \\
**No.** & **X** & **Y** & **Z** & **Length (mm)** \\ \hline
1 & 1 & 1 & 1 & 0.462 \\
2 & 0.729 & 0.698 & 0.717 & 0.515 \\
3 & 0.544 & 0.522 & 0.510 & 0.558 \\
4 & 0.388 & 0.369 & 0.369 & 0.607 \\
5 & 0.277 & 0.396 & 0.242 & 0.653 \\ \hline \hline \end{tabular}
\end{table}
Table 2: The vibration features of the three axes for the training data.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Pass** & \multicolumn{3}{c}{**Accelerometer Axis**} & \multicolumn{2}{c}{**Chamfer**} \\
**No.** & **X** & **Y** & **Z** & **Length (mm)** \\ \hline
1 & 1 & 1 & 1 & 0.462 \\
2 & 0.669 & 0.767 & 0.742 & 0.494 \\
3 & 0.554 & 0.560 & 0.641 & 0.535 \\
4 & 0.431 & 0.508 & 0.507 & 0.586 \\
5 & 0.328 & 0.442 & 0.371 & 0.637 \\ \hline \hline \end{tabular}
\end{table}
Table 3: The vibration features of the three axes for the testing data.  
The objective of this study is to develop an indirect real-time monitoring system equipped with machine learning capabilities to predict the chamfer thickness during a deburring process. To achieve this, the project is segmented into the following tasks:  
* Understanding the AML functionalities
* Vibration feature selection for the deburring process
* Building the machine learning model
* Building the machine learning prediction application
* Webpage design for data visualization
* Database creation for data storage and access
* Integrating the machine learning application, database, and the designed webpage
* System testing