A Comparison of the KNN and Random Forest Algorithms for Predicting Clothing Size Compatibility Based on Anthropometric Data

  • Putra Aji Ardiansyah Universitas Negeri Malang
  • Sulton Hakim Universitas Negeri Malang
  • Aura Medy Aisyah Universitas Negeri Malang
  • Najwa Aulia Fauzi Universitas Negeri Malang
  • Nurul Hidayati Universitas Negeri Malang
  • Muhammad Zaki Wiryawan Universitas Negeri Malang
Keywords: Clothing Size Prediction, K-Nearest Neighbor, Random Forest

Abstract

The rapid development of fashion e-commerce has increased the need for an accurate clothing size recommendation system to reduce size discrepancies when shopping online. Mistakes in selecting clothing sizes often lead to customer dissatisfaction and product returns because consumers cannot try on clothes directly before making a purchase. Therefore, an automatic clothing size prediction system based on anthropometric data is needed to improve the accuracy of clothing size recommendations. This study aims to compare the performance of the K- Nearest Neighbor (KNN) and Random Forest algorithms in predicting clothing sizes based on anthropometric data. The dataset used consists of several anthropometric attributes such as gender, height, weight, and clothing size labels. The research stages include data preprocessing, data normalization, data sharing, model training, and model evaluation. The evaluation was carried out using accuracy, precision, recall, F1-score, and confusion matrix metrics. The results of the study show that both algorithms are capable of classifying clothing sizes well. However, the Random Forest algorithm shows better classification performance and prediction stability than the K-Nearest Neighbor algorithm. The results of this study are expected to contribute to the development of machine learning-based clothing size recommendation systems on fashion e-commerce platforms

Downloads

Download data is not yet available.
Published
2026-10-31
How to Cite
Ardiansyah, P., Hakim, S., Aisyah, A., Fauzi, N., Hidayati, N., & Wiryawan, M. (2026). A Comparison of the KNN and Random Forest Algorithms for Predicting Clothing Size Compatibility Based on Anthropometric Data. Jurnal Media Computer Science, 5(4), 2053-2062. https://doi.org/10.37676/jmcs.v5i4.13372
Section
Articles

Most read articles by the same author(s)