Based on five genes (DHRS9, HIST1H2BK, C16orf74, SLC30A1, and GBP1), the XGB model was selected as the optimal ML model for accurately determining TB subtype and disease status (active or latent). The gene discussed is SLC30A1; the disease is tuberculosis.