Open Access Research Article

Enhancing Eye State Detection Using Deep Neural Networks and Random Forests on EEG Data

Qazi Waqas Khan*

Department of Computer Engineering, Jeju National University, Jeju Special Self-Governing Province, Republic of Korea

Corresponding Author

Received Date:July 17, 2024;  Published Date:July 24, 2024

Abstract

Eye state classification is a common task in cognitive sciences to detect human cognition state and measure human mind action for various applications using Electroencephalography (EEG). Predicting the state of the eye, whether it is open or closed, is known as Eye State Detection. Machine learning methods are used in the literature to classify EEG eye states. In this work, we used Deep Neural Networks and the Random Forest model to predict the state of the eye. This experimental work is performed on an EEG eye state data set. Experimental results show that the DNN achieved 0.86% and the RF model 92% accuracy. Our proposed model correctly classifies the state of the eye.

Keywords:Deep learning; deep neural network; EEG eye state classification; Random forest

Introduction

The electrical action of the cerebrum is recorded through EEG in the structure of a sign [1]. It tends to be additionally viewed as the chronicle of the cerebrum’s unconstrained electrical action over a while [2]. During procurement, signals are obtained by applying a few terminals over the scalp surface [3]. The position and number of terminals are application and objective words [4]. This electrical action is then recorded in a sign [5]. The sign obtained from EEG cathodes is handled in this independent channel. On the other hand, one may utilize the term channel or terminal [6]. It is a process of determining whether the eyes are opened or closed [7]. It is used in many application areas, such as Brain-Computer Interfaces, driver drowsiness detection, and Human-Computer Interaction [8]. Good accuracy is crucial in real-time eye state classification systems [9].

Deep learning has been widely used in the last few years to solve complex problems. Due to deep learning in many complex problem areas, researchers achieved the highest accuracy over traditional machine learning techniques [10]. In this proposed work, we classify the state of the eye. The in-hand data set has 15 attributes and 14497 instances. The eye state variable has binary values 0 and 1. O represents the Eye is open, and one illustrates the eye is closed. In this work, we used a DNN and RF model to classify the state of the eye.

Methodology

To classify the state eye, we divide our methodology into four parts: Data collection, Data preprocessing, proposed model, and Evaluation, which are depicted in Figure 1.

irispublishers-openaccess-engineering-sciences

Data collection

The EEG eye state data set is collected from the UCI machine learning repository. It is a benchmark data set used in several research articles. This data set has 14397 instances and 15 columns. Eye state is the target attribute, and the remaining 14 are independent.

Data preprocessing

Data preprocessing transforms the raw data into a useful form. In this data set, class attribute values are ‘b:0’ and ‘b:1’, which we transform into 0 and 1. We also split our data set into train and test splits with a 70: 30 ratios using the SK learn preprocessing library.

Data normalization

Normalization is used to scale a variable between 0 and 1. Standardization transforms data in 0 to 1 range. Standardization uses zero mean and unit variance to normalize feature value.

Deep neural network

The analysis used a deep neural network to model the EEG eye state data set. In this work, we used a deep neural network with 3 hidden layers [11]. In the first input layer, we used 15 neurons. We Used 3 hidden layers with 23,31and 38 neurons. In each input and hidden layer neuron, we used the ReLU activation function. In the last output layer, we used the softmax activation function. This layer gives the probability of a certain class.

Random forest

Random Forest [12] is an ensemble learning model that grows the decision tree by splitting the data into n parts. Each decision tree is trained on each data part, and finally, the output from each decision tree is merged using the voting average. It is more suitable for tabular data and gives better results.

Evaluation metrics

We evaluate the performance of our proposed model using two evaluation parameters. These are accuracy and loss errors.

Accuracy

Accuracy is an evaluation metric that is used to evaluate the classification model. It is the ratio of correct prediction to the total number of samples.
Accuracy: TP+TN/total number of samples

Loss

Loss is a penalty that indicates the predicted performance of the model. The loss value indicates how our model fits the data. If our model is the best fit for the data, then the loss will be near zero; otherwise, the loss will be greater. In case of greater loss, we optimize the parameter to find the best using backpropagation.
Loss= (y-ŷ)^2 on single instance
Y is an actual value and ŷ is a predicted value.

Results and Discussion

Analysis of the EEG eye state data set has been carried out using a deep neural network. We performed extensive parameter training to achieve high performance. Experimental results show that our proposed model archived 0.8965 accuracy and 0.23 loss value. Model parameters are depicted in Figure 2.

irispublishers-openaccess-engineering-sciences

Figure 2 shows the parameters of the DNN model. It shows that this model is trained using the tree hidden layers, and the sigmoid activation function is used at the output layer to produce the final output.

Figure 3 demonstrates the training and validation accuracy of a DNN model. In this figure, the number of epochs is presented on the x-axis, and the accuracy of a DNN model is presented on the y-axis. It shows the training and validation accuracy is almost identical, and the model is not overfitting.

irispublishers-openaccess-engineering-sciences

Figure 4 shows the classification report of an RF model. It shows this model has 92% accuracy and f score value and performs better than the DNN model. These promising results are due to the fact that the RF model performed well for tabular data.

The confusion metrics of an RF model are presented in Figure 5. It indicates that the RF model has a low miss classification rate and correctly predicts positive and negative classes.

irispublishers-openaccess-engineering-sciences
irispublishers-openaccess-engineering-sciences

Conclusion

EEG eye state classification is used to identify the state of the eye, whether it is open or closed. In the last few decades, it has been observed that in EEG eye state classification, the deep learning model gives better results. In this work, a deep learning model has been applied to the EEG eye state data set to identify the state of the eye. A deep neural network was used, and parameter tuning was performed. After implementing parameter tuning, the RF model achieved 0.92% DNN with 86% accuracy. We conclude that our proposed model correctly classifies the state of an eye for the EEG eye state data set.

Acknowledgement

None.

Conflicts of Interest

No conflict of interest.

References

    1. Gusein-Zade Namik G, Andrey A Slezkin, Elshad Allahyarov (2023) Statistical processing of time slices of electroencephalography signals during brain reaction to visual stimuli. Biomedical Signal Processing and Control 83: 104656.
    2. Miklody Daniel (2020) The neurophysiology of EEG and the physics of the head: theory and Application for Spontaneous EEG. Technische Universitaet Berlin (Germany).
    3. Roberto Portillo-Lara, Bogachan Tahirbegi, Christopher AR Chapman, Josef A Goding, Rylie A Green (2021) Mind the gap: State-of-the-art technologies and applications for EEG-based brain–computer interfaces. APL bioengineering 5(3): 031507.
    4. Barollo Fabio (2022) EEG-based investigation of cortical activity during Postural Control. Diss. Aston University.
    5. Khosla Ashima, Padmavati Khandnor, Trilok Chand (2020) A comparative analysis of signal processing and classification methods for different applications based on EEG signals. Biocybernetics and Biomedical Engineering 40(2): 649-690.
    6. Georgios Michalareas, Ismat MA Rudwan, Claudia Lehr, Paolo Gessini, Alessandro Tavano, et al. (2023) A scalable and robust system for audience EEG recordings. Heliyon 9(10).
    7. Priyadharshini Jayadurga N, M Chandralekha, Kashif Saleem (2023) An Empirical Study on Comparison of Machine Learning Algorithms for Eye-State Classification Using EEG Data. International Conference on Communication and Intelligent Systems. Singapore: Springer Nature Singapore.
    8. Ju Jiawei, Hongqi Li (2024) A Survey of EEG-Based Driver State and Behavior Detection for Intelligent Vehicles. IEEE Transactions on Biometrics, Behavior, and Identity Science 6(3).
    9. Jianliang Min, Ming Cai, Chao Gou, Chen Xiong, Xuejiao Yao (2023) Fusion of forehead EEG with machine vision for real-time fatigue detection in an automatic processing pipeline. Neural Computing and Applications 35(12): 8859-8872.
    10. Shams Forruque Ahmed, Md. Sakib Bin Alam, Maruf Hassan, Mahtabin Rodela Rozbu, Taoseef Ishtiak, et al. (2023) Deep learning modelling techniques: current progress, applications, advantages, and challenges. Artificial Intelligence Review 56(11): 13521-13617.
    11. Raghavendra Ganiga, Yonggang Kim, Raj Tulluri, Wooyeol Choi (2023) Modeling EEG Signals for Mental Confusion Using DNN and LSTM With Custom Attention Layer. IEEE Access 11: 134663-134676.
    12. G Aloy Anuja Mary, M Purna Kishore, Sridevi Chitti, Ramesh Babu Vallabhaneni, N Renuka, et al. (2023) EEG signal classification automation using novel modified random forest approach. Journal of Scientific & Industrial Research 82(1): 101-108.
Citation
Keywords
Signup for Newsletter
Scroll to Top