# Mental Workload Assessment Using Machine Learning Techniques Based on EEG and Eye Tracking Data
## 3 Materials and Methods
### Data Acquisition and Pre-Processing
#### 3.3.2 Eye Tracking Data  
The Tobii X2-60 device (Tobii Pro AB, Stockholm, Sweden) was used to collect eye tracking data. Tobii Studio software (version 3.4.8) recorded three types of eye events: \"fixation\", \"saccade\", and \"unclassified\". The software can detect fixation and saccade movements, but blink data cannot be directly obtained. As a result, a separate analysis was developed for records classified as \"unclassified\". The software allowed for direct measurement of the sizes of the right and left pupils. Additionally, the analysis included variables that were calculated by taking the mean and maximum values of both eyes. Prior to adding the fixation variables to the analysis, records with fixation durations below 80 ms and above 1200 ms were excluded. This exclusion was based on the studies conducted by Wu et al. [20], Borys et al. [23], Borys et al. [42], and Yan et al. [45].  
Blinking refers to the action of either fully or partially closing the eye, as stated by Ahlstrom and Friedman-Berg [5]. In a study focused on detecting blinking movements, the center of the pupil was used as a reference point. If the eye was open, the pupil center could be calculated, and a value of 1 was assigned to the relevant variable. Conversely, if the eye was closed, the center point could not be determined, resulting in a value of 0 for the variable, as explained by Naveed et al. [46]. Following this methodology, the Tobii Studio software provided variables for the right pupil (\"PupilRight\") and left pupil (\"PupilLeft\"). If calculations could be performed using these variables, it was assumed that the eye was open. On the other hand, if there were no data available for either variable, it indicated that the eye was closed. To represent the open and closed states of the eye, a variable named \"BlinkValid\" was introduced, with values of 1 and 0 assigned, respectively.  
Figure 4: EEG signal comparison: (**a**) before pre-processing; (**b**) after pre-processing.  
A blink typically lasts between 100-300 ms, with blinks lasting over 500 ms considered as drowsiness [47]. In this study, the device used had a frequency of 60 Hz, meaning that the duration of a recording line was 1/60 s. To classify situations as blinking for durations of 100 ms and above, the \"BlinkValid\" variable, indicating the number of records where the eye remained closed, was required to be at least six. Additionally, recordings identified as fixation by the Tobii Studio software were excluded from the blink analysis, as blinks occur between two fixation movements. Using Excel Visual Basic for Applications (VBA), records meeting the specified conditions were identified and assigned a \"BlinkIndex\" value, representing the number of blinks. The durations of the blink recordings were calculated by multiplying the duration of a recording (1/60 s) by the number of recordings in each blink event, and these values were stored in the \"BlinkDuration\" variable. The number of records identified as \"blink\" were also counted for each stimulus, and the total durations were determined on a stimulus basis.  
There were 27 variables related to eye tracking, including the number of fixations and saccades. These variables also included the sum, mean, standard deviation, maximum, and minimum of fixation durations and saccade durations. Additionally, the mean, maximum, and standard deviation of saccadic amplitude were measured. The mean, maximum, and standard deviation of pupil diameter were recorded for both the right and left eyes separately, as well as the average of both. The number of blinks, as well as the sum and mean of blink durations, were also taken into account. Fixations below 80 ms and above 1200 ms were excluded, while blink durations were considered between 100 and 500 ms.