Utilizing LSTM and K-NN for Anatomical Localization of Tuberculosis: A Solution for Incomplete Data

Eka Mala Sari Rochman, Miswanto, Herry Suprajitno, Aeri Rachmad, Mula’ab, Iwan Santosa

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)


Tuberculosis (TB) is a prevalent lung disease that significantly contributes to mortality rates, with an estimated 98,000 fatalities observed in Indonesia alone. TB can be classified into two categories based on its anatomical location: pulmonary, when detected in lung parenchyma tissue, and extrapulmonary, when identified in organs outside the lungs. Current diagnostic procedures necessitate numerous laboratory tests and manual assessments, which are both time-consuming and susceptible to data incompleteness, thereby potentially influencing the diagnostic outcomes. This necessitates the development of a rapid and accurate classification system for the anatomical location of TB, which could aid medical professionals in diagnosis. In this study, we propose a novel classification system that utilizes the K-Nearest Neighbors (K-NN) algorithm to handle missing data, and the Synthetic Minority Over-sampling Technique (SMOTE) for data balancing. For the classification of pulmonary and extrapulmonary TB, the study employs the Long Short-Term Memory (LSTM) method, the performance of which is compared with other models, namely Naïve Bayes, Support Vector Machine (SVM), and Backpropagation. Although all four models demonstrated high levels of accuracy, the LSTM method outperformed the others, achieving 100% accuracy compared to Naïve Bayes (99.4%), SVM (99.3%), and Backpropagation (99.7%). These results were obtained after implementing imputation and class balancing stages, and optimizing LSTM features such as the tanh activation function, learning rate of 0.01, 100 LSTM units, and the ADAM optimizer. The proposed system thus presents an effective solution for the rapid and accurate classification of TB based on anatomical location.

Original languageEnglish
Pages (from-to)1114-1124
Number of pages11
JournalMathematical Modelling of Engineering Problems
Issue number4
Publication statusPublished - Aug 2023


  • Backpropagation
  • KNN
  • LSTM
  • Naive Bayes
  • SVM
  • classification
  • missing value
  • tuberculosis


Dive into the research topics of 'Utilizing LSTM and K-NN for Anatomical Localization of Tuberculosis: A Solution for Incomplete Data'. Together they form a unique fingerprint.

Cite this