# EEG-Based Attention Classification for Enhanced Learning Experience
## 3 Results
### Real-Time Neurofeedback-Based Learning  
The implementation of real-time neurofeedback resulted in substantial improvements in adaptive learning. The system dynamically adjusted learning parameters based on real-time EEG data, enhancing engagement and optimizing cognitive load. Participants experienced better learning outcomes and reduced stress levels due to these adaptive difficulty adjustments [23]. These findings demonstrate the model's efficacy in distinguishing between attention levels, which is crucial for real-time quiz difficulty adjustment as mentioned in Figure 6. The model utilizes EEG data to classify attention states into high and low categories, leveraging advanced signal processing and machine learning techniques. The k-NN classifier within the EAC model was trained using features extracted from preprocessed EEG signals. Initially, features from all major frequency bands--Theta, Alpha, Beta, and Gamma--were used to determine the most suitable band for attention state classification. Among these, the gamma band emerged as the most effective predictor, exhibiting the highest classification performance. This finding aligns with gamma's known role in supporting high-level cognitive functions such as attention, memory encoding, and sensory integration. In contrast, theta, alpha, and beta bands demonstrated relatively lower discriminative power. As shown in Table 4, the EAC model achieved an average classification accuracy of 87% for both high and low attention states. For high attention states, the model demonstrated a precision of 91%, recall of 87%, and an F1 score of 88%. For low attention states, the precision was slightly lower at 83%, recall at 85%, and an F1 score of 84%. These results indicate that the EAC model is proficient in distinguishing between high and low attention states, which is crucial for dynamically adjusting quiz difficulty in real-time to match the learner's cognitive state [10]. This adaptive approach aims to optimize the learning experience by maintaining an appropriate level of challenge, thus enhancing engagement and potentially improving learning outcomes. Figure 13 presents three boxplots illustrating the effects of real-time adjustments by the adaptive learning \begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline \multirow{2}{*}{**Band**} & \multicolumn{4}{c}{**NA + KNN**} & \multicolumn{4}{c}{**NA + PCA + KNN**} \\ \cline{2-9}  & **Acc.** & **Prec.** & **Rec.** & **F1-Scr.** & **Acc.** & **Prec.** & **Rec.** & **F1-Scr.** \\ \hline Theta & **71.67 \({}^{*}\)** & **72.89 \({}^{*}\)** & 69.00 & 70.89 & **80.00 \({}^{*}\)** & 78.00 & **81.25 \({}^{*}\)** & **80.00 \({}^{*}\)** \\ Alpha & 74.83 & 73.96 & **76.67 \({}^{*}\)** & **75.29 \({}^{*}\)** & **80.00 \({}^{*}\)** & **80.00 \({}^{*}\)** & **80.00 \({}^{*}\)** & **80.00 \({}^{*}\)** \\ Beta & **83.17 \({}^{*}\)** & **85.41 \({}^{*}\)** & 80.00 & 82.62 & 83.00 & 80.33 & 84.86 & 83.00 \\ Gamma & **89.67 \({}^{*}\)** & **92.20 \({}^{*}\)** & **86.67\({}^{*}\)** & **89.35 \({}^{*}\)** & **91.00 \({}^{*}\)** & **89.00 \({}^{*}\)** & **92.71 \({}^{*}\)** & **91.00 \({}^{*}\)** \\ \hline \hline \end{tabular} \({}^{*}\) Statistical significance (\(p<0.05\)) was assessed using paired \(t\)-tests with Bonferroni correction applied for multiple comparisons.  
\end{table} 
Table 3: Comparison of performance metrics for NA + KNN and NA + PCA + KNN across EEG frequency bands. Asterisks (\({}^{*}\)) denote the higher value between the two methods. system on quiz performance scores, response times, and EEG-derived attention levels. The data show that participants achieved significantly higher quiz scores and shorter response times during periods of high attention, as detected and managed by the system. EEG-derived attention levels also indicated higher values in high attention conditions.