Abstract:Background: Mycobacterium Tuberculosis (TB) is an infectious bacterial disease presenting similar symptoms to pneumonia; therefore, differentiating between TB and pneumonia is challenging. Therefore, the main aim of this study is proposing an automatic method for differential diagnosis of TB from Pneumonia. Methods: In this study, a two-step decision support system named TPIS is proposed for differential diagnosis of TB from pneumonia based on stacked ensemble classifiers. The first step of our proposed model aims at early diagnosis based on low-cost features including demographic characteristics and patient symptoms (including 18 features). TPIS second step makes the final decision based on the meta features extracted in the first step, the laboratory tests and chest radiography reports. This retrospective study considers 199 patient medical records for patients suffering from TB or pneumonia, which has been registered in a hospital in Arak, Iran. Results: Experimental results show that TPIS outperforms the compared machine learning methods for early differential diagnosis of pulmonary tuberculosis from pneumonia with AUC of 90.26 and accuracy of 91.37 and final decision making with AUC of 92.81 and accuracy of 93.89. Conclusions: The main advantage of early diagnosis is beginning the treatment procedure for confidently diagnosed patients as soon as possible and preventing latency in treatment. Therefore, early diagnosis reduces the maturation of late treatment of both diseases.