## 6 Experiment Methodology
In this situation, the training set must include data from all of the participants; hence, the training and test sets' subjects should overlap. Stratified 10-fold cross-validation is used to partition the training and test data so that both sets have the same percentage of data from each subject. Models of identification are created for each activity. For the purpose of testing the identification, a multi-class prediction problem, the accuracy of the machine learning models was used as the metric. The model for every activity was then tested for adversarial attacks by feeding adversarial data (using ZOO attack) to test the models. The experimental method for authentication was quite different from that of identification. The authentication task entails distinguishing between a legitimate subject and an intruder. As a result, authentication is a two-class classification problem. Each model is built utilising data from the subject being verified as well as data from \"other\" subjects that are grouped into a single class. Because data from actual impostors will not be available in real-world scenarios, it is crucial to ensure that the \"impostors\" in the training and test sets do not overlap. Furthermore, authentication model training data must be appropriately partitioned, as a training set with a significant degree of class imbalance will be prejudiced against authenticating a real user. The authentication models are built for every user and for every activity of a user. Because the user-verification process is so reliant on the underlying machine learning models, it is critical to assess the safety and security of these models. Therefore, in order to test this model, adversarial data was generated for the RandomForest model using IBM's ART package, and the model was attacked with a Zero Order Optimisation attack, during which the model's accuracy fell from 97.6 to 28 percent. The probability scores of the model's classification output were studied as a preventive measure (user identification and authentication are treated as classification tasks), and it was discovered that when adversarial examples are introduced, the probability scores for identification drop significantly, indicating that the model is not confident in the adversarial predictions. To protect the model from such attacks, a threshold value was chosen for each model (each activity has its own model), and identification is now only trusted if the classification probability is above the threshold. This adversarial technique is a two-step procedure that can be easily used with multi-factor authentication to make the process more secure. Since the two steps in our user verification model are different procedures, i.e., identification and authentication, this experiment for analysing the vulnerability of the machine learning model on adversarial attacks was also performed for user authentication. Although the accuracy of authentication was significantly affected, the accuracy of the model was not used as the metric for the case of authentication. The Equal Error Rate (EER), a standard metric for comparing authentication methods [29], is used to evaluate authentication performance in this work. The False Acceptance Rate (FAR), which is the rate at which the model erroneously accepts an impostor as a valid user, equals the False Rejection Rate (FRR), which is the rate at which the model incorrectly rejects a legitimate user and is used to calculate this measure. The probability threshold used to assign a classification can be changed to change FAR and FRR. When working on the user verification task, this statistical value is utilised to show biometric performance. On an ROC curve, the EER is the point where the false acceptance rate and false rejection rate are equal. In general, the smaller the equal error rate, the higher the biometric system's accuracy.