Research Article

Simultaneous Feature Selection and Hyperparameter Tuning of K-Nearest Neighbors for Glass Classification: A Comparative Study of Artificial Bee Colony, Simulated Annealing, and Hill Climbing

Volume: 9 Number: 1 January 15, 2026
TR EN

Simultaneous Feature Selection and Hyperparameter Tuning of K-Nearest Neighbors for Glass Classification: A Comparative Study of Artificial Bee Colony, Simulated Annealing, and Hill Climbing

Abstract

Glass identification is essential in forensic science and industrial uses. However, the effectiveness of classification algorithms heavily relies on selecting the correct hyperparameters and relevant features. This study investigates the efficacy of three optimization algorithms—Artificial Bee Colony (ABC), Simulated Annealing (SA), and Hill Climbing (HC)—for optimizing the k value, which is the neighbor value of the k-Nearest Neighbors (k-NN) classifier, the distance measure expressing the proximity between two samples, and the feature subset of the UCI Glass Identification dataset. By reframing the classification problem as a multi-dimensional optimization task, the algorithms are assessed based on accuracy, precision, recall, and F1 score. The results show that the population-based ABC algorithm, as a meta-heuristic approach, outperforms local search methods by avoiding local optima and effectively reducing the dimensionality of the data. RI (refractive index) and Mg (magnesium oxide content) emerge as particularly discriminative features. The study demonstrates that combining automatic parameter tuning with feature selection can substantially enhance the predictive performance of k-NN in complex classification tasks.

Keywords

Supporting Institution

This study did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

Project Number

Yok / Bulunmamaktadır

Ethical Statement

Ethics committee approval was not required for this study because of there was no study on animals or humans.

References

  1. Al-Betar, M. A., Hammouri, A. I., Awadallah, M. A., & Doush, I. A. (2021). Binary β-hill climbing optimizer with S-shape transfer function for feature selection. Journal of Ambient Intelligence and Humanized Computing, 12(7), 7637–7665. https://doi.org/10.1007/s12652-020-02484-z
  2. Ay, Ş., Ekinci, E., & Garip, Z. (2023). A comparative analysis of meta-heuristic optimization algorithms for feature selection on ML-based classification of heart-related diseases. The Journal of Supercomputing, 79(11), 11797–11826. https://doi.org/10.1007/s11227-023-05132-3
  3. Bai, X., Zheng, Y., Lu, Y., & Shi, Y. (2024). Chain hybrid feature selection algorithm based on improved Grey Wolf Optimization algorithm. PLOS ONE, 19(10), e0311602. https://doi.org/10.1371/journal.pone.0311602
  4. Bhowmick, S., & Saha, A. (2023). Enhancing the performance of kNN for glass identification dataset using inverse distance weight, ReliefF ranking, and SMOTE. AIP Conference Proceedings, 2754(1), 020021. https://doi.org/10.1063/5.0161083
  5. Bouziane, M., Bouziane, A., Larguech, S., Naima, K., Haque, M. S., & Menni, Y. (2025). High-performance glass classification using advanced machine learning and deep learning algorithms with a comprehensive feature analysis. AIP Advances, 15(5), 055013. https://doi.org/10.1063/5.0260868
  6. Chantar, H., Tubishat, M., Essgaer, M., & Mirjalili, S. (2021). Hybrid binary dragonfly algorithm with simulated annealing for feature selection. SN Computer Science, 2(4), 295. https://doi.org/10.1007/s42979-021-00687-5
  7. Chen, Z., Xu, Y., Zhang, C., & Tang, M. (2024). Prediction of glass chemical composition and type identification based on machine learning algorithms. Applied Sciences, 14(10), 4017. https://doi.org/10.3390/app14104017
  8. Cover, T., & Hart, P. (1967). Nearest neighbor pattern classification. IEEE Transactions on Information Theory, 13(1), 21–27. https://doi.org/10.1109/TIT.1967.1053964

Details

Primary Language

English

Subjects

Optimization Techniques in Mechanical Engineering

Journal Section

Research Article

Publication Date

January 15, 2026

Submission Date

December 14, 2025

Acceptance Date

January 14, 2026

Published in Issue

Year 2026 Volume: 9 Number: 1

APA
Savaş, S. (2026). Simultaneous Feature Selection and Hyperparameter Tuning of K-Nearest Neighbors for Glass Classification: A Comparative Study of Artificial Bee Colony, Simulated Annealing, and Hill Climbing. Black Sea Journal of Engineering and Science, 9(1), 433-443. https://doi.org/10.34248/bsengineering.1841886
AMA
1.Savaş S. Simultaneous Feature Selection and Hyperparameter Tuning of K-Nearest Neighbors for Glass Classification: A Comparative Study of Artificial Bee Colony, Simulated Annealing, and Hill Climbing. BSJ Eng. Sci. 2026;9(1):433-443. doi:10.34248/bsengineering.1841886
Chicago
Savaş, Sertaç. 2026. “Simultaneous Feature Selection and Hyperparameter Tuning of K-Nearest Neighbors for Glass Classification: A Comparative Study of Artificial Bee Colony, Simulated Annealing, and Hill Climbing”. Black Sea Journal of Engineering and Science 9 (1): 433-43. https://doi.org/10.34248/bsengineering.1841886.
EndNote
Savaş S (January 1, 2026) Simultaneous Feature Selection and Hyperparameter Tuning of K-Nearest Neighbors for Glass Classification: A Comparative Study of Artificial Bee Colony, Simulated Annealing, and Hill Climbing. Black Sea Journal of Engineering and Science 9 1 433–443.
IEEE
[1]S. Savaş, “Simultaneous Feature Selection and Hyperparameter Tuning of K-Nearest Neighbors for Glass Classification: A Comparative Study of Artificial Bee Colony, Simulated Annealing, and Hill Climbing”, BSJ Eng. Sci., vol. 9, no. 1, pp. 433–443, Jan. 2026, doi: 10.34248/bsengineering.1841886.
ISNAD
Savaş, Sertaç. “Simultaneous Feature Selection and Hyperparameter Tuning of K-Nearest Neighbors for Glass Classification: A Comparative Study of Artificial Bee Colony, Simulated Annealing, and Hill Climbing”. Black Sea Journal of Engineering and Science 9/1 (January 1, 2026): 433-443. https://doi.org/10.34248/bsengineering.1841886.
JAMA
1.Savaş S. Simultaneous Feature Selection and Hyperparameter Tuning of K-Nearest Neighbors for Glass Classification: A Comparative Study of Artificial Bee Colony, Simulated Annealing, and Hill Climbing. BSJ Eng. Sci. 2026;9:433–443.
MLA
Savaş, Sertaç. “Simultaneous Feature Selection and Hyperparameter Tuning of K-Nearest Neighbors for Glass Classification: A Comparative Study of Artificial Bee Colony, Simulated Annealing, and Hill Climbing”. Black Sea Journal of Engineering and Science, vol. 9, no. 1, Jan. 2026, pp. 433-4, doi:10.34248/bsengineering.1841886.
Vancouver
1.Sertaç Savaş. Simultaneous Feature Selection and Hyperparameter Tuning of K-Nearest Neighbors for Glass Classification: A Comparative Study of Artificial Bee Colony, Simulated Annealing, and Hill Climbing. BSJ Eng. Sci. 2026 Jan. 1;9(1):433-4. doi:10.34248/bsengineering.1841886

                            24890