Home > Articles > All Issues > 2025 > Volume 14, No. 5, 2025 >
IJMERR 2025 Vol.14(5):534-541
doi: 10.18178/ijmerr.14.5.534-541

Fault Diagnosis in Vehicle Air Conditioning Systems via Comparison of k-Nearest Neighbors and Random Forest Classification Models

Dinh Anh Tuan Tran * , Thi Khanh Phuong Ho, and Van Tuan Nguyen
Faculty of Heat & Refrigeration Engineering, Industrial University of Ho Chi Minh City, Ho Chi Minh 700000, Vietnam
Email: trandinhanhtuan@iuh.edu.vn (D.A.T.T); hothikhanhphuong@iuh.edu.vn (T.K.P.H); nguyenvantuan@iuh.edu.vn (V.T.N)
*Corresponding author

Manuscript received February 7, 2025; revised March 31, 2025; accepted May 22, 2025; published October 14, 2025

Abstract—Fault Detection and Diagnosis (FDD) of vehicle air conditioning (A/C) system is always a vital technique for achieving energy-saving goals and maintaining system reliability. The performance of k-Nearest Neighbors (kNN) and Random Forest (RF) models are invested for diagnosing faults in vehicle A/C systems. Two frequent faults, condenser fouling and refrigerant leakage, are selected in this study. A total of 745 validation samples and 568 test samples, covering normal operation and seven fault conditions with varying levels of these two faults, were analyzed. Model performance was evaluated using accuracy, precision, recall, F1-Score, and Receiver Operating Characteristics (ROC) curve metrics. Additionally, the confusion matrix was employed to provide a detailed breakdown of a model’s classification performance. Results showed that both models achieved high validation accuracy (~91.68%), with RF slightly outperforming kNN in testing (RF: 90.26%). The kNN model exhibited higher recall, enhancing the detection of true positive faults, whereas RF demonstrated better balance between precision and F1-Scores. ROC curve analysis further confirmed that RF provided better discrimination of overlapping fault classes. Confusion matrix results indicated that both models struggled with intermediate levels of condenser fouling, revealing a need for improved fault differentiation. Overall, the RF model demonstrated greater robustness and consistency, making it more suitable for reliable diagnosis of vehicle A/C faults.

Keywords—fault, diagnosis, machine learning model, knearest neighbor, random forest

Cite: Dinh Anh Tuan Tran, Thi Khanh Phuong Ho , and Van Tuan Nguyen, "Fault Diagnosis in Vehicle Air Conditioning Systems via Comparison of k-Nearest Neighbors and Random Forest Classification Models," International Journal of Mechanical Engineering and Robotics Research, Vol. 14, No. 5, pp. 534-541, 2025. doi: 10.18178/ijmerr.14.5.534-541

Copyright © 2025 by the authors. This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited (CC BY 4.0).

Article Metrics in Dimensions