## 3 Results
### Predicting Program Adherence  
Figure 7 provides a visual overview of the distribution of patients into different clusters based on the analysis performed. As depicted, the majority of the patients who remained non-adherent during the whole program's duration were also non-adherent during the familiarization phase. On the other hand, patients who were adherent during the familiarization phase tended to also be adherent for the whole program. One additional interesting finding is that the active patients with low cardiovascular risk during baseline did not adhere to the exercise program.  
A dendrogram was created to predict future adherence to a home-based CR program according to the clinical data at baseline and the adherence to a short familiarization  
Figure 6: Evolution of the mean _adher_ value (mean weekly session duration) for the two clusters based on the spectral clustering. The dotted line reflects the end of the familiarization phase.  
Figure 7: Sankey diagram regarding the different clusters of the analysis for the Present cluster. The Absent patients (n = 9) were not included in the analysis.  
phase. Based on multiple train/test splits and model building with cross-validation in each run, the most frequent models--representing 92% of the total number of models--are depicted in Figure 8. As observed, model \"a\" (left) was the most frequent model, and it had the highest performance (accuracy = 82.3 \(\pm\) 14.7%, precision = 80.2 \(\pm\) 19.5%, and recall = 94.5 \(\pm\) 14.5%).  
The rules of the model with the highest performance (Figure 8a) were as follows:  
1. A patient that is recruited for a home- and exercise-based rehabilitation program has a 58.5 \(\pm\) 2.5% probability to be adherent without any additional knowledge.
2. If the patient is adherent during the familiarization phase, then the probability of being adherent for the whole program reaches 92.3 \(\pm\) 3.5%.
3. For a patient that is non-adherent or has a transient exercise behavior in the familiarization phase, the possibility to be non-adherent for the rest of the program is 55.6 \(\pm\) 3%.
4. If those patients are of high risk, based on the baseline characteristics, then the probability of being non-adherent increases to 82.4 \(\pm\) 3.9%.
5. If those patients are of low risk or are included in the average-baseline cluster, then the probability of being adherent is 63.3 \(\pm\) 3.3%.  
Model \"b\" (middle) is very similar to model \"a\", where the continuation of adherence (second rule) also includes the transient adherence during the familiarization phase in the same branch, and the third rule is also the same, with very similar probabilities. The third model uses rules similar to model \"a\", but it considers the baseline clusters first and then the adherence during the familiarization.  
This instability of the decision tree classification was reduced by the use of the RF classification technique. Four features were identified in all of the RF runs as being significant for the classification of adherence. Figure 9 depicts the mean importance of the features that were used in each of the 100 runs of the classifier. The performance of the RF model (accuracy = 73.4 \(\pm\) 17.5%, precision = 71.8 \(\pm\) 25.8%, and recall = 87.7 \(\pm\) 24%) was lower compared with the most frequent decision tree model (model \"a\"), but the RF model was more robust, revealing the importance of transient-6w users for the prediction of adherence to the whole program.  
Figure 8: The three most frequent models that were created after splitting the dataset 100 times into different training and testing datasets. Model (**a**) was created 61 times, while the frequency for model (**b,c**) was 17 and 14, respectively. The performance metrics for each model is shown in the figure, too. The models are represented as dendrograms with rules. In each node of the tree, the most common class is depicted, along with the respective probability (mean \(\pm\) std).