## 1 Introduction
A number of studies have confirmed this hypothesis: oscillatory changes in frontal alpha (decrease) and beta (increase) power during or after applying stressors such as exam stress [34] and during cognitive stressors such as the Stroop task [35]. In contrast, studies on relaxation techniques such as meditation techniques have noted increased alpha power with the use of these techniques [36; 37; 38; 39]), which has been linked to improved cognitive performance [40; 41]. In this research, we aimed to check if guided imagery (in comparison with a mental workload task) could produce the predicted and observed changes in brainwave activities (mainly an increase in alpha power and, to some extent, a reduction in beta power) as observed using dense array electroencephalography, and whether such differences could be modeled and then classified using a machine learning classifier. This study is innovative because such pattern was found using a guided meditation technique but not (with the exception of [42]) applying the relaxing technique of guided imagery. With technological advances, new tools can provide computer-generated audio-visual displays and produce immersion in digital 3D environments. The literature in this field is expanding. In a study [43], the authors verified whether a VR-guided meditation experience for patients with cancer would produce significant changes in EEG waveforms and whether any changes would occur in the pain experienced during VR-guided mediation. This study demonstrated the feasibility of using EEG recordings in exploring neurophysiological changes in brain activity during VR-guided meditation and its effect on pain reduction. Such modern brain imaging techniques are valuable as they provide data for the verification of the computational models focusing on understanding the relationship between cognition and the brain [44]. [PERSON] created a stress level classification via electroencephalography (EEG) and machine learning on twenty-three volunteers [45]. Participants were subjected to stressful interactions alternating with phases where they were able to relax. After quantitative assessment of the stress level through individualized regression algorithms, the researchers developed stress classifiers that indicated that regression models could quantitatively predict stress levels with noteworthy performance. In this study, we wanted to verify whether obtaining such quantitative prediction but on relaxation level is possible. Therefore, the two main objectives of the study were: to record and visualize the brain cortical activity of subcohorts exposed to guided imagery relaxation and mental tasks and to train a general linearized model (GLM) classifier to classify the recorded signal into one of the two classes: relaxation or mental workload. Such a classifier might allow high-probability identification of when a patient is in a state of relaxation, which will provide the opportunity to create computer-based devices that can help with anxiety and stress reduction. For this study, 60 computer science students at Maria Curie-Sklodowska University in Lublin, were recruited for a randomized trial. Half of the randomly selected students were exposed to relaxation, as recorded by an experienced trainee in guided imagery, whereas the remaining students solved mental tasks. In this paper, we show that it is possible to build a general linear model that can be used to accurately distinguish the state of a participant's brain. Although the GLM is a commonly known classifier, its application to EEG signal analysis is uncommon. The novelty of this study is the evidence of the possibility of classifying two mental states using EEG signal classification and a GLM, which, in the future, may lead to the construction of new therapy-oriented brain-computer interfaces.