Application of XGBoost Algorithm as a Predictive Tool in a CNC Turning Process


  • Shankar Chakraborty Department of Production Engineering, Jadavpur University, India
  • Shibaprasad Bhattacharya Department of Production Engineering, Jadavpur University, India



CNC turning; XGBoost; Prediction; Response


In this paper, an ensemble learning method, in the form of extreme gradient boosting (XGBoost) algorithm is adopted as an effective predictive tool for envisaging values of average surface roughness and material removal rate during CNC turning operation of high strength steel grade-H material. In order to develop the related models, a grid with 24600 combinations of different hyperparameters is created and tested for all the possible hyperparametric combinations of the model. The configurations having the optimal values of the considered hyperparameters and yielding the lowest training error are finally employed for predicting the response values in the CNC turning process. The performance of the developed models is finally validated with the help of five statistical error estimators, i.e. mean absolute percentage error, root mean squared percentage error, root mean squared logarithmic error, correlation coefficient and root relative squared error. Based on the favorable values of all the statistical metrics, it can be observed that XGBoost can be efficiently applied as a predictive tool with excellent accuracy in machining processes.


Abbas, A. T., Alata, M., Ragab, A. E., El Rayes, M. M. & El Danaf, E. A. (2017). Prediction model of cutting parameters for turning high strength steel grade-H: Comparative study of regression model versus ANFIS. Advances in materials Science and Engineering, Article ID 2759020, 12 pages,

Alajmi, M. S., & Almeshal, A. M. (2020).Predicting the tool wear of a drilling process using novel machine learning XGBoost-SDA. Materials, 13(21),

Bhattacharya, S., Das, P.P., Chatterjee, P. & Chakraborty, S. (2021). Prediction of reponses in a sustainable dry turning operation: A comparative analysis. Mathematical Problems in Engineering, Article ID 9967970, 15 pages,

Brown, G. (2011). Ensemble learning.In: Sammut, C., Webb, G.I. (eds) Encyclopaedia of Machine Learning.Springer, Boston, MA.

Chen, K., Chen, H., Liu, L. Chen, S. (2019). Prediction of weld bead geometry of MAG welding based on XGBoost algorithm. International Journal of Advanced Manufacturing Technology, 101(9), 2283-2295.

Chen, T. & Guestrin, C. (2016).XGBoost. In: Proceedings of 22nd International Conference on Knowledge Discovery and Data Mining, California, USA, 785-794.

Chen, T., He, T., Benesty, M., Khotilovich, V., Tang, Y. & Cho, H. (2015). Xgboost: Extreme gradient boosting. R Package Version 0.4-2, 1(4), 1-4.

Choi, D. K. (2019). Data-driven materials modeling with XGBoost algorithm and statistical inference analysis for prediction of fatigue strength of steels.International Journal of Precision Engineering and Manufacturing, 20(1), 129-138.

Deng, J., Xu, Y., Zuo, Z., Hou, Z. & Chen, S. (2019). Bead geometry prediction for multi-layer and multi-bead wire and arc additive manufacturing based on XGBoost. In: Transactions on Intelligent Welding Manufacturing, Springer, Singapore, 125-135.

Dorogush, A. V., Ershov, V. &Gulin, A. (2018). CatBoost: Gradient boosting with categorical features support. In: Proceedings of 32nd Conference on Neural Information Processing Systems, Montréal, Canada, 252-257.

Friedman, J. (2001). Greedy function approximation.A gradient boosting machine.Annals of Statistics, 29(5), 1189-1232.

Friedman, J. H. & Popescu, B. E. (2003). Importance sampled learning ensembles. Journal of Machine Learning Research, 94305, 1-32.

Friedman, J. H. (2002). Stochastic gradient boosting. Computational Statistics & Data Analysis, 38(4), 367-378.

Gao, K., Chen, H., Zhang, X., Ren, X., Chen, J. Chen, X. (2019). A novel material removal prediction method based on acoustic sensing and ensemble XGBoost learning algorithm for robotic belt grinding of Inconel 718. International Journal of Advanced Manufacturing Technology, 105(1), 217-232.

Han, J. H. & Chi, S. Y. (2016).Consideration of manufacturing data to apply machine learning methods for predictive manufacturing. In: Proceedings of 8thInternational Conference on Ubiquitous and Future Networks, Austria, 109-113.

Haynes, G. (2018). Lathe Machine Basics: Introduction to Turning Operations. Cyber Press.

James, G., Witten, D., Hastie, T. &Tibshirani, R. (2013).An Introduction to Statistical Learning with Applications in R. Springer, New York, USA.

Kiangala, S. K. & Wang, Z. (2021). An effective adaptive customization framework for small manufacturing plants using extreme gradient boosting-XGBoost and random forest ensemble learning algorithms in an Industry 4.0 environment. Machine Learning with Applications, 4, 100024.

Kittler, J. & Roli, F. (2003). Multiple classifier systems.In: Lecture Notes in Computer Science, Kittler, J. & Roli, F. (eds.) Springer.

Lan, T. S. & Wang, M. Y. (2009). Competitive parameter optimization of multi-quality CNC turning.International Journal of Advanced Manufacturing Technology, 41(7), 820-826.

Oza, N. C. & Russell, S. J. (2001). Online bagging and boosting. In: International Workshop on Artificial Intelligence and Statistics, Florida, USA, 229-236.

Quinlan, J. R. (1986). Induction of decision trees. Machine learning, 1(1), 81-106.

Schapire, R. E. (2013). Explaining adaboost. In: Empirical Inference. Springer, Heidelberg, 37-52.

Song, K., Yan, F., Ding, T., Gao, L. & Lu, S. (2020). A steel property optimization model based on the XGBoost algorithm and improved PSO. Computational Materials Science, 174, 109472.

Wickham, H., Averick, M., Bryan, J., Chang, W., McGowan, L.D.A., François, R., Grolemund, G., Hayes, A., Henry, L., Hester, J. and Kuhn, M. (2019). Welcome to the Tidyverse. Journal of Open Source Software, 4(43),

Zhang, Z., Huang, Y., Qin, R., Ren, W. & Wen, G. (2021). XGBoost-based on-line prediction of seam tensile strength for Al-Li alloy in laser welding: Experiment study and modelling. Journal of Manufacturing Processes, 64, 30-44.

Zhou, Z. H. (2009). Ensemble learning.Encyclopaedia of Biometrics, 1, 270-273.



How to Cite

Chakraborty, S., & Bhattacharya, S. . (2021). Application of XGBoost Algorithm as a Predictive Tool in a CNC Turning Process . Reports in Mechanical Engineering, 2(1), 190–201.