TIN: TERAPAN INFORMATIKA NUSANTARA
Vol 7 No 3 (2026): August 2026

Perbandingan Kinerja Algoritma SVM dan Random Forest dalam Klasifikasi Tuberkulosis di Puskesmas Sandar Angin

Rinda Desfourtheen (Universitas Indo Global Mandiri, Palembang)
Lastri Widya Astuti (Universitas Indo Global Mandiri, Palembang)
Muhammad Haviz Irfani (Universitas Indo Global Mandiri, Palembang)



Article Info

Publish Date
31 Aug 2026

Abstract

Tuberculosis (TBC) remains a major infectious disease and public health problem in Indonesia, requiring approaches that can support accurate diagnosis. Machine learning can assist TBC classification based on patients’ clinical characteristics, but different algorithms may produce different performance. This study aims to compare the performance of Support Vector Machine (SVM) and Random Forest and determine the best-performing algorithm for TBC classification using patient data from Sandar Angin Public Health Center, Pagar Alam. The study used primary data from 201 patients recorded from January 2023 to October 2025, consisting of 14 variables: number, gender, age, chest pain, productive cough, cough duration, shortness of breath, fatigue, weight loss, body temperature, cold sweats, decreased appetite, sputum, and diagnosis. Model evaluation was conducted using an 80:20 data-splitting scheme and 5-Fold Cross Validation. In the 80:20 split, SVM achieved 98% accuracy, 94% precision, 100% recall, and 97% F1-score, while Random Forest achieved 93% accuracy, 88% precision, 94% recall, and 91% F1-score. Based on 5-Fold Cross Validation, SVM achieved the highest accuracy of 90%, while Random Forest achieved 88%. Overall, SVM demonstrated superior classification performance and was selected as the best-performing algorithm for TBC classification using patient data from Sandar Angin Public Health Center, Pagar Alam.

Copyrights © 2026