## 3 Methodology
### Assessing and Testing the Robustness of the Proposal  
The collected dataset has been partitioned into 80% and 20% for training and validation, respectively, in order to assess the performance of the ML models. To reduce the risk of overfitting, data normalization was applied, and robustness was improved using perturbation-based techniques, including Gaussian noise injection, temporal scaling, and variations in user behavior. These strategies helped ensure that the proposed models remain reliable under diverse usage conditions. Although k-fold cross-validation was not applied, the applied perturbation and evaluation techniques support the reported model performance. Several testing approaches and evaluation metrics have been used to evaluate the robustness and effectiveness of the proposed technique, aiming to get a highly reliable and accurate authentication system under different circumstances and conditions:  
* Recall (Sensitivity): This metric quantifies the proportion of true positives among all actual positives, ensuring genuine users are accurately recognized [8], see Equation (14): \[Recall=\frac{TP}{TP+FN}\] (14)
* Precision: A critical metric for evaluating the proportion of true positives among all predicted positives, reducing false alarms, see Equation (15): \[Precision=\frac{TP}{TP+FP}\] (15) High precision minimizes false-positive rates, which is crucial to preventing unauthorized access [8].
* Accuracy: The primary metric to measure the ratio of correctly classified instances to the total number of instances, see Equation (16): \[Accuracy=\frac{TP+TN}{TP+FP+TN+FN}\] (16) where _TP_, _TN_, _FP_, and _FN_ denote true positives, true negatives, false positives, and false negatives, respectively [8].
* F1-Score: A balanced measure combining precision and recall, particularly useful in scenarios with class imbalances or where addressing the trade-off between precision and recall is critical [8], Equation (17): \[F1=2\cdot\frac{Precision\cdot Recall}{Precision+Recall}\] (17)
* Confusion Matrix (CM): In order to evaluate the system's performance, the CM has been used, in which is can offer information about true negatives, false negatives, true positives, and false positives. This CM can provide valuable details about the model operation [54].  
Resilience testing [53]: The robustness of the proposed technique has been assessed under three different conditions. First, environmental variations are tested, including different lighting conditions (bright, dim, and dark) and humidity levels, to ensure stable feature extraction and classification accuracy. Second, variations in user behavior, such as changes in touch speed, pressure intensity, and swipe dynamics, are tested to assess the system's ability to adapt, with performance measured by accuracy and F1-Score. Finally, the system's performance is tested under different device orientations--portrait, landscape, and tilted--to ensure consistency across various handling scenarios.
* Spoofing Detection Rate (SDR): The effectiveness of the proposed technique can be assessed by using the SDR measurement to reveal and prevent spoofing attempts-based attacks. The mathematical equation of SDR is as in the following [22], see Equation (18): \[SDR=\frac{\text{Total Number of Spoofing Attempts}}{\text{Number of Detected Spoofing Attempts}}\] (18)  
All experiments were conducted on a machine with an Intel Core i7-12700H CPU, 16 GB RAM, running Windows 11 Pro. The implementation used Python 3.10 with Scikit-learn 1.3.2 and NumPy 1.24.