## 6 Conclusions  
The present approach aims to analyze the incidence of latent tuberculosis in patients with rheumatoid arthritis (76 patients) and ankylosing spondylitis (63 patients) treated with biological disease-modifying antirheumatic drugs (bDMARDS), depending on the biological agent and the treatment with conventional DMARDs (csDMARDs) and nonsteroidal anti-inflammatory drugs (NSAIDs). Consequently, the study is divided into two problems. Regarding the patients with rheumatoid arthritis, to goal of this part of the study was to identify the reactivation of latent tuberculosis, evidenced by the positive QuantiFERON test result in patients undergoing biological therapy. We aimed to establish the factors that influence the reactivation of tuberculosis, taking into account both elements related to the patient (age, gender, and medical history) and the treatment they followed (the type of biological therapy, the use of conventional DMARDs or corticosteroids, and the duration of therapy), in order to determine which of them are relevant for our problem. For classification, the classical algorithms used generally gave good results with the implementation in WEKA, a popular collection of machine learning algorithms: random forest, nearest neighbor, k-nearest neighbors, non-nested generalized exemplar, C4.5 decision trees, and support vector machines. The results obtained are presented in two variants: on the entire training set, to highlight the ability of a model to learn the data, and with a 10-fold cross-validation, to highlight the generalization capability of the learned model. Two of the attribute selection algorithms (ReliefF, InfoGain, and correlation-based feature selection) concluded that the biological therapy (bDMARDs) and some of the csDMARDs (Methodrexateate, Hydroxychloroquine, Sulfasalazine, and Leflunomide), play an important role in developing latent TB in the RA patients treated with biological therapy. These results are consistent with information from medical studies, as it is known that biologic therapy involves an increased risk of the reactivation of latent TB in patients with rheumatoid arthritis. The risk of mycobacterial infection is also increased in RA patients treated with csDMARDs, but the risk is lower than in those receiving bDMARDs. The third attribute selection algorithm (ReliefF) concluded that three of the most frequently used csDMARDs (Leflunomide, Methotrexateate, and Hydroxychloroquine) play the most important role in developing LTB. This algorithm also considered that the gender of the patient is important. For the ankylosing spondylitis database, which was the second part of the study, the aim of the modelling was also to identify the reactivation of latent tuberculosis in patients undergoing biological therapy by considering the positive result of the QuantiFERON test. The relevant factors for our problem were also selected from elements regarding the \begin{table}
\begin{tabular}{|p{113.8 pt}|p{113.8 pt}|p{113.8 pt}|} \hline InfoGain & ReliefF & CFS \\
0.1026 bio\_therapy & 0.2175 bio\_therapy & bio\_therapy \\
0.05385 NSAIDs & 0.046 NSAIDs & NSAIDs \\
0.00185 gender & 0.0365 gender & \\
0 diff\_beginning \\ \end{tabular} & 0.0182 diff\_beginning \\ \end{tabular} & \\
0 age & \(-0.0127\) age & \\ \hline \end{tabular}
\end{table} 
Table 20: The results of the attribute selection algorithms. patient and the treatment, with the difference being that medical history was not taken into consideration for these patients, and that the concomitant treatment was with NSAIDs, and not DMARDs and corticosteroids. For the AS patients, all the selection algorithms concluded that the biological therapy is the most important factor for the risk of TB, followed by NSAID use and the patients' genders. The use of bDMARDs in AS patients increases the risk of TB, especially for those treated with TNF inhibitors. It is also known that there is a substantially larger incidence of TB in men than in women, so patients' genders play an important role.