# Authentication by Keystroke Dynamics: The Influence of Typing Language
## 4 Results and Discussion  
### Experimental Setup  
We investigate the effects of language on keystroke dynamics using the BKSD dataset and four classification algorithms. We evaluate our models and dataset using the Google Colab environment.  
To evaluate the performance of keystroke dynamics classifiers, criteria that measure the frequency of errors that occur during imposter detection are used. There are two types of errors:  
1. False rejection rate (FRR): Also known as a type I error. In this error, the classifier rejects a genuine user, i.e., classifies a user as an imposter. A small FRR is desirable, as only a small number of genuine users are refused access. The following equation is used to calculate the FRR if the attacker is considered in the positive class (i.e., 0: user, 1: attacker): \[FRR=\frac{FP}{TN+FP}\] (2) where \(FP\) stands for false positives, and \(TN\) stands for true negatives.
2. False acceptance rate (FAR): Also known as a type II error. In this error, the classifier accepts an imposter, i.e., classifies an imposter as an authentic user. FAR rates are also known as miss rates. FAR errors are more critical than FRR errors, and thus, it is more desirable to have this error as low as possible. FAR is calculated as follows if the attacker is considered in the positive class (i.e., 0: user, 1: attacker): \[FAR=\frac{FN}{TP+FN}\] (3) where \(FN\) stands for false negatives, and \(TP\) stands for true positives.  
In a biometric system, both error measures outlined above should be minimised to ensure accurate and reliable system performance. In addition, a threshold is selected that bounds error rates in a system to enhance system performance. To determine the threshold value, two measures are employed:  
1. Equal error rate (EER): Sometimes called the crossover error rate (CER), the EER is the point where both type i and type II errors are equal; see Figure 4. A smaller EER value implies lower FRR and FAR rates, thus a better performing verification system.
2. Zero-miss false alarm rate (ZM-FAR): This measure ensures that no attacker can gain access to the system by selecting a threshold value such that the miss rate of attackers is zero. ZM-FAR prioritises security by not accepting imposters at the expense of increasing FRR values. Note that the letter \"A\" in ZM-FAR stands for alarm and not acceptance.  
The relationship between FAR and FRR is an inverse relationship. A system administrator considers the trade-off between user experience and the level of security. If the administrator wishes to increase security by minimising FAR, a rise in FRR occurs, which translates into a negative user experience because of frequent rejections by the system of legitimate users. On the other hand, lower FAR values translate into more accurate biometric systems with higher security profiles. The system administrator selects the threshold based on the required security measures, and a classifier that has lower EER and ZM-FAR values surpasses a classifier with higher values.  
In addition, we also provide results for the following metrics, which are frequently reported in classification problems:  
1. _Recall (R)_ is the percentage of instances correctly classified out of the total number of instances that are actually true. It can be calculated as follows: \[R=\frac{TP}{TP+FN}\] (4)
2. _Precision (P)_ is the percentage of instances correctly classified as true out of the total number of instances classified as true. Precision is calculated as follows: \[P=\frac{TP}{TP+FP}\] (5)
3. _Accuracy_ is the percentage of records classified correctly and is calculated as follows: \[Accuracy=\frac{TP+TN}{TP+TN+FP+FN}\] (6)