Concrete Compressive Strength Prediction System Using K-Nearest Neighbor (KNN) Regression with k-Parameter Tuning Implementation
DOI:
https://doi.org/10.54065/likelihood.1461Keywords:
Concrete Compressive Strength, KNN Regression, K-Parameter Tuning, Machine Learning, Concrete PredictionAbstract
Concrete compressive strength is a principal indicator of concrete quality, but standardized testing requires specimen preparation, controlled curing, equipment, and time. This study develops and internally evaluates a K-Nearest Neighbor (KNN) regression model for rapid strength estimation from mixture composition and curing age. The UCI Concrete Compressive Strength dataset contained 1,030 records; removing 25 repeated records yielded 1,005 unique observations with eight original predictors and compressive strength as the response. LogAge, Water-Cement Ratio, and Total Aggregate were added as engineered predictors. The cleaned data were divided into 80% training and 20% testing subsets, while data-dependent preprocessing and hyperparameter selection were performed using the training data only. Odd k values from 1 to 41 were assessed by 10-fold cross-validation repeated five times. The minimum cross-validated error occurred at k = 3. On the held-out test subset, the final model achieved an R² of 0.88, RMSE of 5.56 MPa, and MAE of 3.74 MPa. LogAge, Water-Cement Ratio, and cement content had the largest absolute correlations with strength, although these correlations are descriptive rather than KNN-specific importance measures. The results show that a tuned and standardized KNN model can provide useful preliminary strength estimates within the represented data domain. However, the model is intended to support mixture screening and quality-control decisions, not replace standardized laboratory testing. External validation and comparison with alternative algorithms are required before broader deployment.
References
Al-Shamiri, A. K., Yuan, T.-F., & Kim, J. H. (2020). Non-tuned machine learning approach for predicting the compressive strength of high-performance concrete. Materials, 13(5), 1023. https://doi.org/10.3390/ma13051023
An, Y., Xu, M., & Shen, C. (2019). Classification method of teaching resources based on improved KNN algorithm. International Journal of Emerging Technologies in Learning (iJET), 14(4), 73–88. https://doi.org/10.3991/ijet.v14i04.10131
Arman, A. (2018). Kajian kuat tekan beton normal menggunakan standar SNI 7656-2012 dan ASTM C 136-06. Rang Teknik Journal, 1(2), 142–148.
Asteris, P. G., Skentou, A. D., Bardhan, A., Samui, P., & Pilakoutas, K. (2021). Predicting concrete compressive strength using hybrid ensembling of surrogate machine learning models. Cement and Concrete Research, 145, 106449. https://doi.org/10.1016/j.cemconres.2021.106449
Banjarsari, M. A., Budiman, H. I., & Farmadi, A. (2015). Penerapan K-optimal pada algoritma KNN untuk prediksi kelulusan tepat waktu mahasiswa Program Studi Ilmu Komputer FMIPA UNLAM berdasarkan IP sampai dengan semester 4. Kumpulan Jurnal Ilmu Komputer, 2(2), 50–64.
Behnood, A., & Golafshani, E. M. (2018). Predicting the compressive strength of silica fume concrete using hybrid artificial neural network with multi-objective grey wolves. Journal of Cleaner Production, 202, 54–64. https://doi.org/10.1016/j.jclepro.2018.08.065
Behnood, A., Behnood, V., Modiri Gharehveran, M., & Alyamac, K. E. (2017). Prediction of the compressive strength of normal and high-performance concretes using M5P model tree algorithm. Construction and Building Materials, 142, 199–207. https://doi.org/10.1016/j.conbuildmat.2017.03.061
Chou, J.-S., Tsai, C.-F., Pham, A.-D., & Lu, Y.-H. (2014). Machine learning in concrete strength simulations: Multi-nation data analytics. Construction and Building Materials, 73, 771–780. https://doi.org/10.1016/j.conbuildmat.2014.09.054
Daulay, R. S. A. (2024). Analisis kritis dan pengembangan algoritma K-nearest neighbor (KNN): Sebuah tinjauan literatur. Jurnal Pendidikan Sains dan Komputer, 4(2), 131–141.
DeRousseau, M. A., Laftchiev, E., Kasprzyk, J. R., Rajagopalan, B., & Srubar, W. V., III. (2019). Machine learning methods for predicting the field compressive strength of concrete. Construction and Building Materials, 228, 116661. https://doi.org/10.1016/j.conbuildmat.2019.08.042
Fadilla, R., Dewi, K., & Gusmana, R. (2018). Implementasi metode K-nearest neighbor (KNN) dalam pengelompokan status ekonomi warga. Jurnal Big Data Analisis dan Artificial Intelligence, 4(1), 15–22.
Fei, Z., Liang, S., Cai, Y., & Shen, Y. (2023). Ensemble machine-learning-based prediction models for the compressive strength of recycled powder mortar. Materials, 16(2), 583. https://doi.org/10.3390/ma16020583
Herdiansyah, & Pangaribuan, M. R. (2013). Pengaruh batu cadas (batu trass) sebagai bahan pembentuk beton terhadap kuat tekan beton. Jurnal Inersia, 5(2), 11–19.
Hsieh, S.-C. (2021). Prediction of compressive strength of concrete and rock using an elementary instance-based learning algorithm. Advances in Civil Engineering, 2021, 6658932. https://doi.org/10.1155/2021/6658932
Ihzaniah, L. S., Setiawan, A., & Wijaya, R. W. N. (2023). Perbandingan kinerja metode regresi K-nearest neighbor dan metode regresi linear berganda pada data Boston Housing. Jambura Journal of Probability and Statistics, 4(1), 17–29. https://doi.org/10.34312/jjps.v4i1.18948
Kapoor, S., & Narayanan, A. (2023). Leakage and the reproducibility crisis in machine-learning-based science. Patterns, 4(9), 100804. https://doi.org/10.1016/j.patter.2023.100804
Kuhn, M. (2008). Building predictive models in R using the caret package. Journal of Statistical Software, 28(5), 1–26. https://doi.org/10.18637/jss.v028.i05
Li, D., Tang, Z., Kang, Q., Zhang, X., & Li, Y. (2023). Machine learning-based method for predicting compressive strength of concrete. Processes, 11(2), 390. https://doi.org/10.3390/pr11020390
Nanja, M., & Purwanto. (2015). Metode K-nearest neighbor berbasis forward selection untuk prediksi harga komoditi lada Muis. Jurnal Pseudocode, 2(1), 53–64.
Pakzad, S. S., Roshan, N., & Ghalehnovi, M. (2023). Comparison of various machine learning algorithms used for compressive strength prediction of steel fiber-reinforced concrete. Scientific Reports, 13, 3646. https://doi.org/10.1038/s41598-023-30606-y
Prasetyo, Y. A., Utami, E., & Yaqin, A. (2024). Pengaruh komposisi split data terhadap performa akurasi analisis sentimen algoritma Naïve Bayes dan SVM. Journal of Electrical Engineering and Computer Science, 6(2), 382–390.
Rahardja, C. A., Juardi, T., & Agung, H. (2019). Implementasi algoritma K-nearest neighbor pada website rekomendasi laptop. Jurnal Buana Informatika, 10(1), 75–84. https://doi.org/10.24002/jbi.v10i1.1847
Rathakrishnan, V., Beddu, S., & Ahmed, A. N. (2022). Predicting compressive strength of high-performance concrete with high volume ground granulated blast-furnace slag replacement using boosting machine learning algorithms. Scientific Reports, 12, 9539. https://doi.org/10.1038/s41598-022-12890-2
Risdiyanto, Y. (2013). Kajian kuat tekan beton dengan perbandingan volume dan perbandingan berat untuk produksi beton massa menggunakan agregat kasar batu pecah Merapi (Studi kasus pada proyek pembangunan Sabo Dam). Jurnal Tugas Akhir, 1–11.
Ritonga, M. R. R., Sihombing, M., & Selfira. (2024). Pemodelan K-nearest neighbor untuk identifikasi pola kepuasan mahasiswa terhadap pelayanan kampus (Studi kasus: STMIK Kaputama). Jurnal Informatika dan Sains Teknologi, 2(4), 152–161.
Sapkota, S. C., Panagiotakopoulou, C., Dahal, D., Beskopylny, A. N., Dahal, S., & Asteris, P. G. (2025). Optimizing high-strength concrete compressive strength with explainable machine learning. Multiscale and Multidisciplinary Modeling, Experiments and Design, 8, 160. https://doi.org/10.1007/s41939-025-00737-y
Vabalas, A., Gowen, E., Poliakoff, E., & Casson, A. J. (2019). Machine learning algorithm validation with a limited sample size. PLOS ONE, 14(11), e0224365. https://doi.org/10.1371/journal.pone.0224365
Wan, Z., Xu, Y., & Savija, B. (2021). On the use of machine learning models for prediction of compressive strength of concrete: Influence of dimensionality reduction on the model performance. Materials, 14(4), 713. https://doi.org/10.3390/ma14040713
Yeh, I.-C. (1998). Modeling of strength of high-performance concrete using artificial neural networks. Cement and Concrete Research, 28(12), 1797–1808. https://doi.org/10.1016/S0008-8846(98)00165-3
Yeh, I.-C. (2007). Concrete compressive strength [Data set]. UCI Machine Learning Repository. https://doi.org/10.24432/C5PK67
Young, B. A., Hall, A., Pilon, L., Gupta, P., & Sant, G. (2019). Can the compressive strength of concrete be estimated from knowledge of the mixture proportions? New insights from statistical analysis and machine learning methods. Cement and Concrete Research, 115, 379–388. https://doi.org/10.1016/j.cemconres.2018.09.006
Zhang, Y., Ren, W., Chen, Y., Mi, Y., Lei, J., & Sun, L. (2024). Predicting the compressive strength of high-performance concrete using an interpretable machine learning model. Scientific Reports, 14, 28346. https://doi.org/10.1038/s41598-024-79502-z
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Delfi Rosaria Simanjuntak, Aditama Rouliber Simanulang, Riwi Dyah Pangesti, Wina Ayu Lestari, Winalia Agwil

This work is licensed under a Creative Commons Attribution 4.0 International License.





