## 5 Experimental Study
### Modelling Results
#### 5.2.2. _Ankylosing Spondylitis Results_  
For the ankylosing spondylitis database, 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 selected from elements regarding the patient and the treatment, with the difference being that the medical history was not taken into consideration for these patients, and also that the concomitant treatment was with NSAIDs, and not DMARDs and corticosteroids. The problem had the following input attributes: age (integer value, in years), gender (binary value), biological therapy (symbolic, with the following types: 1 = BENEPALI, 2 = COSENTYX, 3 = ENBREL, 4 = HUMIRA, 5 = REMICADE, 6 = SIMPONI), the difference from the beginning of therapy (integer value, in days), and the concomitant use of NSAIDs (binary value). The output was also binary and consisted of the QuantiFERON-TB Gold Test indicator, where 1 suggested the presence of tuberculosis, and 0 the absence of the disease. Data preprocessing regarding the duration of the therapy was conducted for the RA database as the difference of days between the date of the medical tests and the starting date of the biological therapy. In contrast to the RA database, this database included only one record for each patient. In this way, each patient had an equal weight in the development of the model. Table 16 presents the results obtained with this approach. This dataset is also unbalanced, with 48 instances in class 0 and 15 instances in class 1. Therefore, in order to assess the precision and recall measures, the same approach as in Section 5.2.1 was performed for data augmentation. Table 17 presents the results for the best model (random forest) for the two cases: the original dataset, and the augmented dataset. It is clear that the results are better in the latter case. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Classification Method** & **Accuracy on the Training Set** &
\begin{tabular}{c} **Accuracy for** \\ **Cross-Validation** \\ \end{tabular} & **Accuracy for Leave-One-Out** \\ \hline Random forest, & 100\% & 69.8413\% & 71.4286\% \\
100 trees & 100\% & 69.8413\% & 71.4286\% \\ \hline NN & 100\% & 65.0794\% & 63.4921\% \\ \hline kNN, & 100\% & 65.0794\% & 66.6667\% \\ k = 10, w = 1/d & & & \\ \hline C4.5, & 82.5397\% & 74.6032\% & 77.7778\% \\ Unpruned & 76.1905\% & 76.1905\% & 76.1905\% \\ \hline SVM, & 79.3651\% & 71.4286\% & 73.0159\% \\ \hline \hline \end{tabular}
\end{table} 
Table 16: Classification results for all records in the dataset. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Classification Method/Dataset** & **TP Rate** & **FP Rate** & **Precision** & **Recall** & **F1** \\ \hline Random forest, & 0.813 & 0.667 & 0.796 & 0.813 & 0.804 \\
1000 trees, & 0.333 & 0.188 & 0.357 & 0.333 & 0.345 \\ original dataset & 0.698 & 0.553 & 0.691 & 0.698 & 0.695 \\ \hline Random forest, & 0.708 & 0 & 1 & 0.708 & 0.829 \\
1000 trees, & 1 & 0.292 & 0.774 & 1 & 0.873 \\ augmented dataset & 0.854 & 0.146 & 0.887 & 0.854 & 0.851 \\ \hline \hline \end{tabular}
\end{table} 
Table 17: Precision and recall analysis for the original and augmented datasets. Another analysis referred to the evolution of the positive patients, for which the QuantiFERON-TB Gold Test indicator was initially 0 and, at one point, became 1. In this case, we wanted to highlight a symbolic model for this medical situation. Beyond the numerical results, the aim was to provide the medical staff with some explanations for the conditions that could change the health of patients in the sense mentioned above. Table 18 shows the results obtained with the NNGE (non-nested generalized exemplars) algorithm, which is based on an instance-based learning paradigm, but determines generalized specimens, i.e., hyper-rectangles in the problem space, consisting of a set of individual instances that belong to the same class and cannot contain instances of a different class.