## 5 Results and Discussion
### Models Performance  
Model performance is evaluated and compared with accuracy, precision, recall, f1-score, RMSE, hamming loss, and inference time. Accuracy refers to the ratio of correctly predicted instances, that is, both the true positives and the true negatives, against the total number of instances in the dataset. It provides an overall measure of how often the model is correct. \[\text{Accuracy}=\frac{\text{True Positives + True Negatives}}{\text{Total Number of Instances}} \tag{1}\]  
Precision is the proportion of rightly predicted positive values out of all the records that are predicted as positive. \[\text{Precision}=\frac{\text{True Positives}}{\text{True Positives + False Positives}} \tag{2}\]  
Recall is the ratio of the number of correctly predicted positive records to the total actual positive records. It is also known as the True Positive Rate. The F1 score gives one single metric, which considers both precision and recall when you need to maintain a balance between these two. \[\text{F1 Score}=2\times\frac{\text{Precision}\times\text{Recall}}{\text{ Precision}+\text{Recall}} \tag{3}\]  
RMSE (Root Mean Square Error) is used to measure the accuracy of the models in predicting continuous outcomes; the lower the values, the better. \[\text{RMSE}=\sqrt{\frac{1}{\text{n}}\sum(y_{i}^{\prime}-y_{i})^{2}}, \tag{4}\]  
where n is the number of samples, y' is the predicted value, and y is the actual value. In a multi-label classification task, the hamming loss measures the fraction of incorrectly predicted labels and provides insight into how accurate the models are in classification scenarios. Inference time is the time taken to evaluate each model's computational efficiency during prediction. The results indicate a significant drop in accuracy when FHE is applied. This can be attributed to the additional noise introduced during the encryption process, which affects the performance of the ML models. Additionally, the execution time increased dramatically with FHE, highlighting the computational overhead associated with processing encrypted data. Figure 3: Number of activities in a dataset. * The accuracy score with and without FHE for all three models is shown in Table 4. The accuracy for XGBoost and Random Forest on plaintext is almost the same, except for the Decision Classifier, which has 96% accuracy. Encrypting the test data and drawing inferences from them results in a minimal drop in accuracy compared to models without encryption. However, the Decision Classifier performs better with FHE than both plaintext and the other two models. * In the cases of precision, recall, and F1 score, we identified a similar trend. When applying FHE, the Decision Classifier model demonstrates remarkable resilience and makes a significant difference in maintaining precision and recall. For Random Forest and XGBoost, encrypting data results in degradations primarily in precision and recall, as shown in Figure 4. The F1 score, which balances precision and recall, reflected this minor degradation. On average, the Decision Classifier performed best in maintaining performance metrics using FHE, making it an ideal candidate for privacy-preserving machine learning tasks. * To determine the computational overhead introduced by encryption, we made a comparison of the execution times for models with and without FHE, as depicted in Figure 5. In XGBoost, execution time increased slightly with FHE, as anticipated due to the additional computational overhead associated with encryption. Random Forest's inference time is almost negligent, indicating a possible improvement in encrypted data handling. The Decision Classifier has a significantly higher execution time under FHE, showing the overhead added by encryption. It may therefore not be appropriate for applications that require real-time performance. The analysis suggests that even though FHE adds overhead, model selection could critically impact this; XGBoost was the most efficient model relative to execution time.