# Modeling of Cutting Force in the Turning of AISI 4340 Using Gaussian Process Regression Algorithm
## 4 Results and Discussion  
The GPR algorithm was executed in the MATLAB software (Mathworks, Natick, MA, USA) package to model the cutting force for turning AISI 4340 alloy steel with reference to experimental data reported in [21]. The actual data of the turning process of AISI 4340 compared to GPR, SVM, and ANN are presented in Table 3, showing 60 trials of each process to evaluate every combination of input parameters of depth of cut, cutting speed and feed rate, while the output response variable is the resultant force. The resultant forces changed within the individual trials due to the change of input parameters. Table 2 provides the statistical performance indicators of each method in terms of the _MAPE_, _RMSE_, _MAE_, and \(R^{2}\) values. It is noted that GPR achieved the best accuracy in predicting the surface roughness values with RMSE of 1.86% and a high coefficient of determination value of \(R^{2}\) = 0.98. The high value of \(R^{2}\) clearly indicates that the predicted values closely match the actual experimental values of the surface cutting force, and the superior performance of the GPR is evident, due to the algorithm's superiority in exploring the search space and avoiding the local optima trap. The SVM provides the second-best prediction values with an _RMSE_ of 3.07% and an \(R^{2}\) of 0.97. This can be addressed to the gradient ensemble in combining different weak learners into a meta learner that provides the best prediction at each step. The ANN resulted in a relatively comparable performance with the SVM method in terms of the coefficient of determination with \(R^{2}\) = 0.947. However, it has a slightly higher RMSE value of 3.46%, which is higher than the SVM algorithm by 0.27%. The computational cost of the methods was measured in terms of the time to train the algorithm to predict the data. The GPR was trained on the input dataset within 0.3507 s, while the ANN and SVM were trained within 1.3395 s and 0.88296 s, respectively. GPR is superior in terms of the amount of training time, and it produces the highest prediction accuracy in terms of the performance metrics in Table 4.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Data** & **Actual** & **GPR** & **SVM** & **ANN** \\ \hline  
Figure 2 illustrates a graphical comparison between the actual cutting force values and the values predicted by the GPR, SVM and ANN methods. The superior prediction performance of the GPR can be clearly noted by the close match of each data point on the graph with the actual value of the surface roughness. Figure 3 shows the trend line between the actual versus the predicted values of each prediction algorithm in order to provide the coefficient of determination values \(R^{2}\). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Indicator** & **GPR** & **SVM** & **ANN** \\ \hline STD & 11.8659845 & 10.8311621 & 10.9700107 \\ MAPE & 5.12881818 & 7.91289907 & 10.8512889 \\ MAE & 1.2790129 & 2.05869621 & 2.3533598 \\ MSE & 3.46918946 & 9.43121873 & 11.1943294 \\ RMSE & 1.86257603 & 3.07102894 & 3.34579279 \\ CVRMSE & 15.6967677 & 28.353642 & 30.4994487 \\ \(R^{2}\) & 0.9843 & 0.9711 & 0.9475 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Performance measure for the GPR, SVM, and ANN for turning process for AISI 4340. Figure 3: Actual values of the cutting force in comparison with values predicted by GPR, SVM, and ANN and coefficient of determination trend lines. Figure 2: Actual cutting force values in comparison with predictions by GPR, SVM, and ANN methods. With the results obtained in this section, it is evident that GPR yields promising results in the field of predicting and modeling the cutting forces in a turning process. One limitation of the GPR algorithm is that it is only feasible for datasets of a few thousands [26] due to the computation of matrix inversions, which is highly computation-intensive for large datasets.