###### Abstract
The SVM and GLM were the top two best-performing models. Clinical and radiographic data-driven predictive models performed reasonably well in predicting the radiographic progression of axSpA. Another study by [PERSON] et al. [8] used machine learning algorithms (k-nearest neighbors and random forest) and deep learning-based classifiers to detect erosions on computed tomography (CT) imagery as an early AS symptom. In their study, the random forest classifiers outperformed the kNN classifiers and the best deep learning classifier was the one trained without minimizing validation loss. The results indicate the potential of machine and deep learning to aid the diagnostics of AS based on CT imagery. The present study aims to analyze the incidence of latent tuberculosis in patients with rheumatoid arthritis and ankylosing spondylitis 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). The importance of this analysis lies in the fact that the medical problem has a practical utility, and the training data belong to real patients. The study included 76 patients diagnosed with RA and 63 patients diagnosed with AS, undergoing biological treatment with original and biosimilar bDMARDS, in monotherapy or in combination therapy. Based on the therapeutic protocols regarding the use of biological agents in RA and AS patients,they were monitored for tuberculosis infections by performing the QuantiFERON TB-Gold test prior to and during the biological treatment. QuantiFERON-TB Gold test results were positive in 21.05% of RA patients and 23.8% of AS patients during the biological therapy, suggesting the presence of a tuberculosis infection. The classification problem aims to predict an indicator of tuberculosis (the results of the QuantiFERON-TB Gold Test), given a series of statistics about the patients, such as gender, age, the biological agent, the duration of biological therapy, if the therapy is monotherapy or combination therapy, the history of tuberculosis (for the RA patients), the date, and the result of the QuantiFERON-TB Gold test. In order to confirm that these attributes were relevant to our problem, three attribute-selection algorithms were used: Relieff, correlation-based feature selection (CFS) and information gain (InfoGain). The datasets were analyzed using machine learning algorithms. For classification, the following algorithms that generally give good results were applied: random forest, k-nearest neighbors (kNN), C4.5 decision trees, and support vector machines (SVM). For each algorithm, the most important parameters were varied, such as the number of trees for random forest, the number of neighbors and the weighting function of the importance of the neighbors for k-nearest neighbors, pruned or unpruned versions for the C4.5 decision trees, and the kernel type for 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, which refers to the model's ability to respond to unseen data in the training phase. Satisfactory results were obtained in the simulation, proving the efficiency of the applied methods.