Next Article in Journal
Advanced Field-Effect Sensors
Previous Article in Journal
Hierarchical Multi-Objective Optimization for Dedicated Bus Punctuality and Supply–Demand Balance Control
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

EOG Signal Classification with Wavelet and Supervised Learning Algorithms KNN, SVM and DT

by
Sandy Nohemy Hernández Pérez
1,
Francisco David Pérez Reynoso
2,*,
Carlos Alberto González Gutiérrez
2,
María De los Ángeles Cosío León
3 and
Rocío Ortega Palacios
1,*
1
Master’s Degree in Information and Communications Technologies, Universidad Politécnica de Pachuca (UPP), Zempoala 43830, Mexico
2
Center for Research, Innovation and Technological Development UVM (CIIDETEC-UVM), Universidad del Valle de México, Querétaro 76230, Mexico
3
Direction of Research, Innovation and Graduate Studies, Universidad Politécnica de Pachuca (UPP), Zempoala 43830, Mexico
*
Authors to whom correspondence should be addressed.
Sensors 2023, 23(9), 4553; https://doi.org/10.3390/s23094553
Submission received: 29 March 2023 / Revised: 21 April 2023 / Accepted: 2 May 2023 / Published: 7 May 2023
(This article belongs to the Section Biosensors)

Abstract

:
The work carried out in this paper consists of the classification of the physiological signal generated by eye movement called Electrooculography (EOG). The human eye performs simultaneous movements, when focusing on an object, generating a potential change in origin between the retinal epithelium and the cornea and modeling the eyeball as a dipole with a positive and negative hemisphere. Supervised learning algorithms were implemented to classify five eye movements; left, right, down, up and blink. Wavelet Transform was used to obtain information in the frequency domain characterizing the EOG signal with a bandwidth of 0.5 to 50 Hz; training results were obtained with the implementation of K-Nearest Neighbor (KNN) 69.4%, a Support Vector Machine (SVM) of 76.9% and Decision Tree (DT) 60.5%, checking the accuracy through the Jaccard index and other metrics such as the confusion matrix and ROC (Receiver Operating Characteristic) curve. As a result, the best classifier for this application was the SVM with Jaccard Index.

1. Introduction

The ocular muscles produce an electrical potential difference with an origin between the corneal pigment epithelium and the retina [1]. This differential is known in [2] as the Electrooculography (EOG) signal. EOG is obtained using silver electrodes placed superficially on the face, registering the horizontal channel (left-right movements) and the vertical channel (up and down movements).
The use of EOG in [3,4,5,6,7] the literature reviewed shows mostly its application by users with motor disabilities, turning their eyes to communicate. Therefore, the monitoring of biological signals such as EOG allows the integration of everyday objects, as mentioned in [8], where writing is performed by selecting a group of limited words for the response of short sentences; another application handled in [9] has is the electrical control of a wheelchair by eye movements; as well as in [10], the recognition of eye movement by different parameters detected in the signal, when visualizing different abstract images; the movement of the mouse cursor when receiving a signal from both eyes is described in [11], and the directional control of a robot in [12] were designed by a method based on saccadic movements and eye reflexes that were obtained as the average speed, maximum speed and voltage range in the developed model and did not include the fixed gaze and blinking movement.
EOG signal parameters are mostly detected at low frequencies, in a bandwidth of 0.5 to 50 Hz. The eye movement classification is based on algorithms that implement the calculation of the signal derivative; each algorithm targets different parameters (average velocity, maximum velocity, average acceleration, maximum acceleration, amplitude range, average velocity, maximum velocity, filtered average acceleration, filtered maximum acceleration, amplitude range, signal coefficients, four order of the polynomial, fit and slope of the signal) of the EOG signal amplitude for class classification; these parameters can be obtained in the time domain.
Many classification algorithms have been used to identify eye movements in EOG signals, including fixations and muscle denoising. Due to their relevant results presented, K-Nearest Neighbor (KNN), Support Vector Machine (SVM) and Decision Tree (DT) are reported as simpler and more efficient algorithms for EOG classification. In [13], the classification of an EOG signal using power spectral density (PSD) is described, these features are the neural network input and support vector machine (SVM) algorithm, and the performance of the combination of these methods achieves a classification accuracy of 69.75%.
There has been research on the combination of KNN and SVM algorithms; for example, [14] used image classification, relying on a spectral feature parameter input, to reduce the time of classification and data selection.
In [15], the authors classified 23 feature emotions such as anger, fear, happiness and sadness, obtaining an accuracy of 75.15% for KNN and 80% for SVM, comparing two algorithms to find the classifier with the highest result.
In the implementation of physiological signals in the time domain addressed in [16], the efficiency of the classification accuracy with the confusion matrix was tested. Comparing the results obtained from both classifiers, it was concluded that the SVM algorithm obtained 60% classification with the handling of six parameters.
In the case of [17], the extraction of 16 parameters of the EOG movement signal in the time domain was applied, taking 12 test subjects as a sample; the authors were classified with DT (95.4), KNN (99.6%) and SVM (99.1%) algorithms, and it was reported that by using the ROC curve, it was shown that the best result could be obtained by the KNN algorithm.
The following sections describe the EOG signal acquisition protocol, data preprocessing using Wavelet Transform [18,19], selecting of the Mother Wavelet using entropy and statistical parameters such as variance, peak magnitude ratio (RMS) and peak amplitude (AMP), the average and median frequency of the total samples, and the classification of five eye movements (left, right, up, down and blink) is described using the supervised learning algorithms KNN, DT and SVM, to validate the efficiency of each classifier metrics such as the ROC curve [20], confusion matrix [21] and Jaccard Index [22], which were implemented.

2. Materials and Methods

2.1. EOG Acquisition

The EOG signal was acquired using a recording protocol with 5 surface mount Ag/AgCl electrodes, as shown in Figure 1; the recording had a bandwidth between 0.5 and 50 Hz with a gain amplitude of 100, which expressed the ratio between the amplitude of an output signal with respect to the input signal, and a resolution of 11 bits using the Biopac Student Lab® system. The protocol consisted of performing 10-s movement periods following a direction indicator; the user followed different positions (up, down, right, and left) and returned to the resting position; this was described as looking straight ahead. A fixation and blink record was also obtained to classify and identify noise signals in the EOG signal acquisition. The resulting file extension was .mat, and this acquisition process is presented in Figure 2 with the signal expressing an amplitude range of −0.3 to 0.3 Volts.
To validate the performance of each classifier, the EOG signal was divided into Horizontal and Vertical, positive action potentials corresponding to the Right/Horizontal movement (Figure 3a) and Up/Vertical movement (Figure 3b), while negative action potentials corresponded to the Left/Horizontal (Figure 3c) and Down/Vertical movement (Figure 3d); the database contained a fixation and blink record (Figure 4).
Figure 5 graphically represents the EOG data set, with a total of 32,500 samples. This is the input used in the processing with the Wavelet Transform.
Table 1 shows the range from the beginning to the end of each eye movement, starting with data 0 to 32.500 of the total samples.
Once a range of eye movements was obtained, the processing was performed with the use of the Wavelet transform, which is explained in Section 2.2, where dimensionality reduction with the transform is explained, as well as its selection with the entropy method. This is followed by Section 2.3, starting with the metrics that were calculated from the general signal for the input to the classifier.

2.2. Wavelet

The frequency spectrum of the EOG signal was analyzed, the mathematical tools implemented were Fourier and Wavelet, and the EOG signal had a dynamic behavior, i.e., it varied in time and frequency. By implementing Fourier, the harmonics of the energy spectrum of the signal reduced the information; thus, Wavelet Transform [23,24] was implemented to analyze the different levels of signal frequency obtained in tests of the different movements of eyeballs.
Wavelets are functions used to approximate data with variations, transient and non-stationary phenomena. In the implemented algorithm, data are processed at different resolutions if a signal or function is observed using a wide “data window”. Waveforms are not observed, and such windows are automatically adjusted when changing resolution. Wavelet analysis consists of three steps: decomposition, thresholding and reconstruction.
The continuous wavelet transform (CWT) can be defined as the sum of all scaled and shifted components of the Mother Wavelet’s overall time, as shown in Equation (1).
CWT  ​ ( a ,  ​ b ) = 1 a x t ψ ( t b a ) dt ,
where a is the scale, t is time, b is the displacement and x(t) is the input function and ψ indicates the wavelet function.
The above equation is scaled by ‘a’ and then translated to a second scalar as ‘b’; x represents the EOG signal as a function of time t. Wavelet has a set of families which have members with different parameters for its calculation, and there are two ways to select a Wavelet. The first is to search among the different wavelet families, which have a similar shape to the signal; the second is based on testing with the different wavelets to obtain a smoothing in the signal without losing the points of interest in the original. When a wavelet is selected, it is called the Mother Wavelet, which is represented by Equation (1).
The wavelet detail coefficients indicate the relationship between the signal and the Mother Wavelet, and this ratio allows us to know the frequency components of the signal.
Mother Wavelet was determined using the entropy method; it provides levels [25] that define the amount of disorder of a data set, i.e., the result after its application on the signal, which indicates that the farther it is from the original state, the greater the amount of disorder; therefore, this alters the correlation between the processed signal and the original one.
Thus, this demonstrated that the levels of detail coefficients lost a significant amount of information, indicating that it had a higher level of entropy. The calculation is presented in Equation (2). In [26], methods for obtaining optimization through the Bayesian method of hyperparameters for the classification of stationary signals are presented; however, in this work, it was indicated that with entropy, it was feasible to obtain optimal results of the hyperparameters for classification with supervised algorithms.
Entropy  ​ ( S ) = p c log 2 p c ,
where S represents the data set in which the entropy is calculated, p(c) is the portion of data points that belong to class c, and to the total number of data points in the set.
The application of the Mother Wavelet of the EOG signal is shown in Figure 6, where the signal has a different shape from the original; this is given by the detailed coefficients that were applied and allowed important data to be obtained without loss of information.
By obtaining the Wavelet detail level data, we obtain a new signal with the most relevant information of the original one. The results obtained in the frequency spectrum were confirmed in windows of four data; obtaining 508 windows of each EOG channel, the calculation of nine metrics was performed, as shown in Table 2.
Descriptions of each metric that were applied to the signal to obtain data for the classification algorithm.

2.3. Classification Algorithms

The implementation of a classification algorithm is one of the requirements to identify offline classes whose membership is known based on training. In this study, offline classification was implemented using three supervised learning algorithms: SVM, KNN and DT.
To compare the best classification results, the classes were labeled (Table 3) to input them into the different algorithms.
Each movement was assigned a class starting from 0 to class 4.

2.4. K-Nearest Neighbors Algorithm (KNN)

K-Nearest Neighbor (KNN) is a supervised learning algorithm that uses the proximity of distances for classification by a majority vote, assigning the case to the most common class among its nearest neighbors (K), which is measured by a distance function that then uses the Euclidean equation, as shown in Equation (3).
d x , y = i = 1 n ( y i x i ) 2
where x corresponds to the query point (K) and y to the nearest neighbor to determine which neighbor is the nearest. Application of equation in Algorithm 1 KNN.
Algorithm 1 KNN
Requiere: Determine the sample of set data (80% training and 20% testing)
Select the value of K
for each new sample do
Calculate the distance for simples
 Determine the set of K neighbors with the closest distance   d x , y = i = 1 n ( y i x i ) 2
The label with the most representative in the set of K neighbors is chosen
end for
Ensure: Determine the accuracy and the best neighbor

2.5. Support Vector Machine Algorithm (SVM)

Support Vector Machines are a supervised learning classifier that works by correlating data in a feature space so that data points can be categorized, even if they are not linearly separated. The features of the new data can be used to define the group to which the new record belongs. To allow some flexibility, the algorithm handles a parameter, C, which controls the trade-off between training errors and rigid margins, thus creating a margin that allows for some errors in the classification, i.e., gives control over the classification errors. The mathematical function used for the transformation is known as a kernel. The polynomial equation shown in Equation (4) was used.
K x i , x j = ( y x i T x j + r ) d , y > 0                                  
where K(xi,xj) corresponds to the matrix of n × n kernel elements, xi,xj corresponds to the feature hyperplane, {(yx}_i^Tx_j+r ) d support vectors act as a separation between classes and represents the data for the measurement and r is the parameter that is being adjusted or calibrated. Application of equation in Algorithm 2 SVM.
Algorithm 2 SVM
Require: Determine the sample of set data (80% training and 20% testing)
Ensure: Determine the accuracy
Select kernel
Select the optimal value of the cost and gamma for SVM
while (topping condition is not met)   K x i , x j = ( y x i T x j + r ) d , y > 0  
do
Implement SVM train step for each data point
Implement SVM classification for testing data points
end while
accuracy

2.6. Decision Tree Algorithm (DT)

The decision tree algorithm is a machine learning-based algorithm for classification, where an internal node represents a feature, the branch represents a decision rule, and each leaf node represents the result. The top node in a decision tree is known as the root node. It performs a partitioning from the attribute value function and splits the tree in a recursive manner called recursive partitioning. Its structure helps to make decisions from each training set containing labels of each class and predictor variables that can be inspected for a decision or split, which results in a left node and a right node. This starts from the root of the tree and ends at the endpoint in the form of a leaf node giving an output class. Each partition is performed with the clustering of the Gini index, which is presented in Equation (5). Application of equation in Algorithm 3 DT.
g d i = 1 i p 2 i
where 1 i p 2 i corresponds to the subnode calculation, p 2 to the sum of the probability squares and i to the data.
Algorithm 3 DT
Require: Determine the sample of set data (80% training and 20% testing).
Each data are analyzed as the root node of the decision tree is assigned.
Each member is assigned a child node.
 Each of the members of the tree is analyzed and a label is assigned   g d i = 1 i p 2 i
Predictions are made based on the result of each child with the labeling of each member.
accuracy

2.7. Jaccard Index

The well-known Jaccard similarity algorithm is an algorithm designed to measure similarities between sample sets. There is function-based analysis, which is typically used to study the resemblance of small numbers of sets and, additionally, the analysis of large data sets, calculated by Equation (6).
s i m j A , B = A B A B  
where a is the data in group A, b is the data in group B and c is the number of elements present in both groups A and B.

2.8. Methodology

The simulations and results were run on a laptop computer with the following computer characteristics: AMD Ryzen 5 3450U with Radeon Vega Mobile Gfx processor with a processor speed of 2.10 to 3.5 GHz and 4 MB processor cache, (2 × 8 dual channel) 16 GB of DDR4 memory at 3000 MHz, a 256 GB Crucial SSD and a video card AMD Radeon 73 graphics card, and the operating system Windows 11 Home Single Language version 22H2 64-bit.
Matlab 2022 was used for signal processing; Python language was used for coding the algorithms as well as the metrics in an online environment. This was implemented on Google Research’s Colaboratory, which allows the execution of different programming languages.
The Train-Test Split method of the Cross-Validation technique was used, which consists of randomly decomposing the data series; this method was very accurate since we evaluated the combinations of training and test data, and the number of iterations depended on the size of the data set; usually, 80% of the data were reserved to be used for training the Machine Learning model. The remaining 20% of the data allowed for testing the algorithm for validation, as applied in this research.
A diagram in Figure 7 shows the process followed by the EOG signal with the implemented techniques.

3. Results and Discussion

The results obtained from the eye movements in different classification algorithms were analyzed to be defined based on sensitivity and specificity. This, by using the metrics, represented the percentage that corresponded to the most classified values.
We applied the Entropy method to the data obtained from the transform to determine the Wavelet to apply or mother, as shown in the Vertical EOG in Table 4 and Horizontal EOG in Table 5. We analyzed the family wavelet Haar(haar), Coiflets (coif), Symelets (sym), Fejer Korovkin Filters (fk), Discrete Meyer (meyr), Biorthogonal (bio) and Reverse Biorthogonal (rbio), which were the ones that showed similarity with the original signal.
Table 4 shows the results in the rbio family of the Wavelets families.
With the data obtained, it was determined that Wavelet Reverse Biorthogonal would be used in the signal, becoming the Wavelet Mother. Derived from the fact that after the application of entropy, it showed results with lower amounts of information disorder, this family contained members with characteristics that allowed a signal with a level of smoothing to be obtained after its application without losing important data of the original signal. Entropy was applied to each of the 14 members of the Reverse Biorthogonal (rbio) family, showing that member 3.1 was one of those with the least amount of entropy; it this selected as the Wavelet Mother by visual comparison with the other members, showing its five levels of detail coefficient in both EOG channels, which allowed significant data to be obtained from the original signal. Each result is shown in Table 6 for the Vertical EOG channel and in Table 7 for the Horizontal EOG.
Entropy was applied to each of the 14 members of the Reverse Biorthogonal family, and the result with the least amount of entropy was shown in member 3.1. Each result is displayed in Table 6 for the Vertical EOG channel and Table 7 for Horizontal EOG.
The Bior 3.1 family member in the Vertical channel is shown as marked.
Each level of detail coefficient allows the signal to be viewed by segments, finding characteristic points in the parameters. Five levels were analyzed, of which level 4 showed a level of smoothing in the signal, allowing the beginning and end of each of the EOG movements to be found.

3.1. Confusion Matrix

The confusion matrix was applied to the results of both EOG channels, and the results are shown visually in Figure 8 below.
In the Table 8 shows each of the positive values for the Horizontal EOG channel; negative values, false positives and false negatives for each of the characteristics, these data are important for the calculation of the confusion matrix terms.
Table 9 shows each of the positive values for the Vertical EOG channel, including negative values, false positives, and false negatives for each of the characteristics; these data were important for the calculation of the confusion matrix terms.
VP indicates True Positive, VN indicates True Negative, FN expresses False Negative and FP indicates False Positive.
The results of the aforementioned calculations are shown in Table 10 for the Horizontal EOG channel and Table 11 for the Vertical EOG channel, each corresponding to the result of the characteristic applied to the signal.
The calculation of the data of the confusion matrix in the Horizontal channel is shown.
The results of the calculation for sensitivity, specificity, accuracy, and precision in the Vertical EOG channel are given.

3.2. ROC Curve

The results obtained from the ROC curve in the KNN algorithm are presented in Table 12, SVM in Table 13, and DT in Table 14; they show the obtained results of sensitivity and specificity after the input of the complete signal to the classifier to indicate the difference between each term with each result obtained indicating a higher sensitivity index in SVM, checking with the calibration given in this algorithm.
These results obtained from the ROC Curve application of KNN, SVM and DT algorithms were obtained and are explained below in Figure 9, Figure 10 and Figure 11 respectively.
(a)
KNN
The cutoff point was obtained, and it was visualized as the ROC line changed direction, derived from the variation in the signal data; however, the ROC curve is shown with no success in its classification in the first half of the data, resuming an improvement in the classification in the rest of the signal.
(b)
SVM
By changing the value of C, the hyperplane of the Kernel was modified. A calibration process was performed (Figure 12), where the value was adjusted, and by choosing a value close to 0, it became closer to some points than others; basically, there was no restriction, and we ended up with a hyperplane that did not classify anything. Since the data were linearly separable, a large C could be used, but this may have been an outlier, and that is why we used a hyperplane very close to the margin with no outlier. We tried several values, and we can say that the selected one provided the freedom to our classifier.
Cross-validation was used with the total data, where 80% was used for training and the remaining 20% for testing; in this graph, from the calibration in C, the qualification improved.
The sensitivity and specificity (Table 14) of the SVM algorithm were calculated with the results obtained with the classification.
The data show a change in the cutoff point; throughout the signal, they were shown above the diagonal that divides the ROC space. The points above the diagonal represent good classification results; they became better as the signal classification progressed.
(c)
DT
Table 14 shows the cut-off point sensitivity and specificity of the ROC curve result of the DT algorithm.
Inconsistency was shown in the classification, where no improvement was evident at any point in the signal, indicating that this was an inefficient algorithm for classification.

3.3. Jaccard Index

In the Table 15 shows the results of the signal classified with the three classification algorithms with the application of the Jaccard metric, as explained above.
In the analysis of the classification results, SVM obtained the best result compared to the other algorithms in the test column, with 76.9%.
The selection of the KNN, SVM and DT algorithms was derived from issues of explainability since the article focused on the health area.

4. Conclusions

Performing routine activities for people with motor disabilities is a problem that impacts their quality of life. For this reason, the research presented in this paper is about the acquisition of two EOG channels that allows data to be acquired from different eye movements, with the help of the implementation of the Wavelet Reverse Biorthogonal 3. 1 to identify the different waveforms of the signal through acquisition windows; this process improved the responses of supervised classifiers KNN, SVM and DT and through the Jaccard index metric the efficiency level of each algorithm was checked. The best result, with a value of 76.9%, was obtained for the SVM classifier in the Jaccard Index metric; according to the state-of-the-art reported, it exceeded the percentage of response in the efficiency of supervised classifiers with values of 69.75% reported in [13]. This translated into better data classification. The program codes and methods implemented in this research are provided at: https://acortar.link/nW8l0s (accessed on 4 May 2023).
For future work, we propose the use of these classifiers by implementing them in different tools, such as a human–machine interface to support assistance and interaction with different users to apply it in the medical area, reducing the response time and the learning curve of inexperienced users.

Author Contributions

Conceptualization, F.D.P.R. and R.O.P.; Methodology, S.N.H.P. and M.d.l.Á.C.L.; Software, S.N.H.P.; Validation, C.A.G.G.; Formal Analysis, S.N.H.P. and M.d.l.Á.C.L.; Investigation, S.N.H.P., F.D.P.R. and R.O.P.; Resources, F.D.P.R.; Data Curation, S.N.H.P.; Writing—original draft preparation, S.N.H.P.; Writing—review and editing, F.D.P.R., M.d.l.Á.C.L. and R.O.P.; Visualization, S.N.H.P., F.D.P.R., C.A.G.G., M.d.l.Á.C.L. and R.O.P.; Supervision, F.D.P.R.; M.d.l.Á.C.L. and R.O.P.; Project Administration, F.D.P.R.; Funding Acquisition, S.N.H.P., F.D.P.R., C.A.G.G., M.d.l.Á.C.L. and R.O.P. All authors have read and agreed to the published version of the manuscript.

Funding

This research was partially financed by the Polytechnic University of Pachuca, Universidad del Valle de México Queretaro Campus and the National Council of Science and Technology (CONACYT), co-financed with federal funds.

Institutional Review Board Statement

No ethical review and approval were required for the study on human participants in accordance with local legislation and institutional requirements. The participants provided your written informed consent to participate in this study. Written informed consent was obtained from the person for the publication of potentially identifiable images or data included in this article.

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study and written informed consent has been obtained from the patient to publish this paper.

Data Availability Statement

Information on this research can be obtained from the following link https://acortar.link/nW8l0s (accessed on 4 May 2023).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Pérez-Reynoso, F.D.; Rodríguez-Guerrero, L.; Salgado-Ramírez, J.C.; Ortega-Palacios, R. Human–Machine Interface: Multiclass Classification by Machine Learning on 1D EOG Signals for the Control of an Omnidirectional Robot. Sensors 2021, 21, 5882. [Google Scholar] [CrossRef]
  2. Perez Reynoso, F.D.; Niño Suarez, P.A.; Aviles Sanchez, O.F.; Calva Yañez, M.B.; Vega Alvarado, E.; Portilla Flores, E.A. A Custom EOG-Based HMI Using Neural Network Modeling to Real-Time for the Trajectory Tracking of a Manipulator Robot. Front. Neurorobot. 2020, 14, 578834. [Google Scholar] [CrossRef] [PubMed]
  3. Goto, S.; Yano, O.; Matsuda, Y.; Sugi, T.; Gashira, N. Development of Hands-Free Remote Operation System for a Mobile Robot Using EOG and EMG. Electron. Commun. Jpn. 2017, 100, 38–47. [Google Scholar] [CrossRef]
  4. Barea, R.; Boquete, L.; Bergasa, L.M.; Lopez, E.; Mazo, M. Electro-Oculographic Guidance of a Wheelchair Using Eye Movements Codification. Int. J. Robot. Res. 2003, 22, 641–652. [Google Scholar] [CrossRef]
  5. Aungsakul, S.; Phinyomark, A.; Phukpattaranont, P.; Limsakul, C. Evaluating Feature Extraction Methods of Electrooculography (EOG) Signal for Human-Computer Interface. Procedia Eng. 2012, 32, 246–252. [Google Scholar] [CrossRef]
  6. López, A.; Ferrero, F.; Postolache, O. An Affordable Method for Evaluation of Ataxic Disorders Based on Electrooculography. Sensors 2019, 19(17), 3756. [Google Scholar] [CrossRef] [PubMed]
  7. López, A.; Ferrero, F.; Yangüela, D.; Álvarez, C.; Postolache, O. Development of a Computer Writing System Based on EOG. Sensors 2017, 17, 1505. [Google Scholar] [CrossRef] [PubMed]
  8. Barea, R.; Boquete, L.; Mazo, M.; López, E. Wheelchair Guidance Strategies Using EOG. J. Intell. Robot. Syst. 2002, 34, 279–299. [Google Scholar] [CrossRef]
  9. Lord, W.P. Designing for Social Connectivity (Not Everyone Likes Webcams). Elearn 2021. [Google Scholar] [CrossRef]
  10. Gandhi, T.; Trikha, M.; Santhosh, J.; Anand, S. Development of an expert multitask gadget controlled by voluntary eye movements. Expert Syst. Appl. 2010, 37, 4204–4211. [Google Scholar] [CrossRef]
  11. Hossain, Z.; Shuvo, M.M.H.; Sarker, P. Hardware and software implementation of real time electrooculogram (EOG) acquisition system to control computer cursor with eyeball movement. In Proceedings of the 2017 4th International Conference on Advances in Electrical Engineering (ICAEE), Dhaka, Bangladesh, 28–30 September 2017; pp. 132–137. [Google Scholar]
  12. Alberto, L.; José, R.; Villar, M.F.; Francisco, J.F. Comparison of classification techniques for the control of EOG-based HCIs. Biomed. Signal Process. Control. 2023, 80, 104263. [Google Scholar] [CrossRef]
  13. Qi, L.J.; Alias, N. Comparison of ANN and SVM for classification of eye movements in EOG signals. J. Phys. Conf. Ser. 2018, 971, 012012. [Google Scholar] [CrossRef]
  14. Alimjan, G.; Sun, T.; Liang, Y.; Jumahun, H.; Guan, Y. A New Technique for Remote Sensing Image Classification Based on Combinatorial Algorithm of SVM and KNN. Int. J. Pattern Recognit. Artif. Intell. 2018, 32, 1859012. [Google Scholar] [CrossRef]
  15. Nugrahaeni, R.A.; Mutijarsa, y.K. Comparative analysis of machine learning KNN, SVM, and random forests algorithm for facial expression classification. In Proceedings of the 2016 International Seminar on Application for Technology of Information and Communication (ISemantic), Semarang, Indonesia, 5–6 August 2016. [Google Scholar] [CrossRef]
  16. Paul, Y.; Goyal, V.; Jaswal, R.A. Comparative analysis between SVM & KNN classifier for EMG signal classification on elementary time domain features. In Proceedings of the 2017 4th International Conference on Signal Processing, Computing and Control (ISPCC), Solan, India, 21–23 September 2017. [Google Scholar] [CrossRef]
  17. Babita Syal, P.; Kumari, P. Comparative Analysis of KNN, SVM, DT for EOG based Human Computer Interface. In Proceedings of the 2017 International Conference on Current Trends in Computer, Electrical, Electronics and Communication (CTCEEC), Mysore, India, 8–9 September 2017; IEEE, 2017. [Google Scholar] [CrossRef]
  18. Lee, G.; Gommers, R.; Waselewski, F.; Wohlfahrt, K.; O’Leary, A. PyWavelets: A Python package for wavelet analysis. J. Open Source Softw. 2019, 4, 1237. [Google Scholar] [CrossRef]
  19. Zhang, D. Fundamentals of Image Data Mining; Springer International Publishing: Berlin/Heidelberg, Germany, 2019. [Google Scholar] [CrossRef]
  20. Chauhan, A.S.; Lilhore, U.K.; Gupta, A.K.; Manoharan, P.; Garg, R.R.; Hajjej, F.; Keshta, I.; Raahemifar, K. Comparative Analysis of Supervised Machine and Deep Learning Algorithms for Kyphosis Disease Detection. Appl. Sci. 2023, 13, 5012. [Google Scholar] [CrossRef]
  21. Zhao, J.; Nurmemet, U.K.; Gupta, I.; Muhetaer, N.; Xiao, S.; Abulaiti, A. Monitoring Soil Salinity Using Machine Learning and the Polarimetric Scattering Features of PALSAR-2 Data. Sustainability 2023, 15, 7452. [Google Scholar] [CrossRef]
  22. Sieber, G.; Freudenberg, B.; Netzel, L.; Schmidt, T.C.; Brandenstein, F. The Premise of Interdisciplinarity and Its Actual Absence—A Bibliometric Analysis of Publications on Heavy Rainfall. Water 2022, 14, 3001. [Google Scholar] [CrossRef]
  23. Pothisarn, C.; Klomjit, J.; Ngaopitakkul, A.; Jettanasen, C.; Asfani, D.A.; Negara, I.M.Y. Comparison of Various Mother Wavelets for Fault Classification in Electrical Systems. Appl. Sci. 2020, 10, 1203. [Google Scholar] [CrossRef]
  24. Jang, Y.I.; Sim, J.Y.; Yang, J.-R.; Kwon, N.K. The Optimal Selection of Mother Wavelet Function and Decomposition Level for Denoising of DCG Signal. Sensors 2021, 21, 1851. [Google Scholar] [CrossRef]
  25. Straumal, B.; Konyashin, I. WC-Based Cemented Carbides with High Entropy Alloyed Binders: A Review. Metals 2023, 13, 171. [Google Scholar] [CrossRef]
  26. Zhang, Y.-M.; Wang, H.; Mao, J.-X.; Xu, Z.-D.; Zhang, Y.-F. Probabilistic Framework with Bayesian Optimization for Predicting Typhoon-Induced Dynamic Responses of a Long-Span Bridge. J. Struct. Eng. 2021, 147, 04020297. [Google Scholar] [CrossRef]
Figure 1. The electrodes were placed superficially on the participant’s face. The GND electrodes had the function of being the reference of the horizontal and vertical lead (placed on the forehead or earlobe). A and B are the electrodes of the horizontal channel, C and D are the electrodes of the vertical channel.
Figure 1. The electrodes were placed superficially on the participant’s face. The GND electrodes had the function of being the reference of the horizontal and vertical lead (placed on the forehead or earlobe). A and B are the electrodes of the horizontal channel, C and D are the electrodes of the vertical channel.
Sensors 23 04553 g001
Figure 2. Signal recording process that was saved in a file with extension .mat that served as an input to the classification algorithms; the process started with the placement of electrodes next to the acquisition system, followed by calibration tests, obtaining the signal and ending with the storage of a data file.
Figure 2. Signal recording process that was saved in a file with extension .mat that served as an input to the classification algorithms; the process started with the placement of electrodes next to the acquisition system, followed by calibration tests, obtaining the signal and ending with the storage of a data file.
Sensors 23 04553 g002
Figure 3. (a) Graphic representation of the Electrooculography acquisition of the movement looking to the right, with a threshold ranging from −0.1 to 0.25 volts. (b) Signal of eye movement looking to the left, with a threshold of −0.3 to 0.2 volts. Both movements were acquired by the Horizontal EOG channel. (c) Eye movement looking up, with a threshold of −0.1 to 0.2 volts. (d) Figure representing the downward gaze signal, with a threshold of −0.1 to 0.1 volts. Both movements were acquired by the Vertical EOG channel. All movements acquired within a range of 10 s.
Figure 3. (a) Graphic representation of the Electrooculography acquisition of the movement looking to the right, with a threshold ranging from −0.1 to 0.25 volts. (b) Signal of eye movement looking to the left, with a threshold of −0.3 to 0.2 volts. Both movements were acquired by the Horizontal EOG channel. (c) Eye movement looking up, with a threshold of −0.1 to 0.2 volts. (d) Figure representing the downward gaze signal, with a threshold of −0.1 to 0.1 volts. Both movements were acquired by the Vertical EOG channel. All movements acquired within a range of 10 s.
Sensors 23 04553 g003
Figure 4. Graphical representation of the Electrooculography acquisition during blinking movement acquisition process; both Vertical and Horizontal EOG channels can be seen in a period of 10 s with a voltage range of −0.4 to 0.5 volts in the vertical EOG channel and a voltage range in the Horizontal channel of −0.1 to 0.2 volts. The Vertical channel shows the greatest amount of change in the signal at the time of flashing.
Figure 4. Graphical representation of the Electrooculography acquisition during blinking movement acquisition process; both Vertical and Horizontal EOG channels can be seen in a period of 10 s with a voltage range of −0.4 to 0.5 volts in the vertical EOG channel and a voltage range in the Horizontal channel of −0.1 to 0.2 volts. The Vertical channel shows the greatest amount of change in the signal at the time of flashing.
Sensors 23 04553 g004
Figure 5. Graphical representation of EOG data set with both Vertical and Horizontal channels, with a total of 32,500 samples for each. Each eye movement (down, up, blink, left and right) is indicated in each of the sample ranges. Each of them was acquired in a 10-s period, keeping the signal in a general range of −0.3 to 0.5 volts.
Figure 5. Graphical representation of EOG data set with both Vertical and Horizontal channels, with a total of 32,500 samples for each. Each eye movement (down, up, blink, left and right) is indicated in each of the sample ranges. Each of them was acquired in a 10-s period, keeping the signal in a general range of −0.3 to 0.5 volts.
Sensors 23 04553 g005
Figure 6. (a) The original signal is shown with variations in the signal including its highest point with an amplitude of 2.0 volts; (b) The modified signal after going through the calculation of the Bio Reverse Wavelet transform 3.1.
Figure 6. (a) The original signal is shown with variations in the signal including its highest point with an amplitude of 2.0 volts; (b) The modified signal after going through the calculation of the Bio Reverse Wavelet transform 3.1.
Sensors 23 04553 g006
Figure 7. Diagram of the application of the methodology; starting from the original signal, continuing with the wavelet application and the entropy method for the selection of the Mother Wavelet, finishing with the application of the wavelet transform.
Figure 7. Diagram of the application of the methodology; starting from the original signal, continuing with the wavelet application and the entropy method for the selection of the Mother Wavelet, finishing with the application of the wavelet transform.
Sensors 23 04553 g007
Figure 8. Confusion matrix with 9 features for each Vertical EOG (Table 7) and Horizontal EOG (Table 8), each number from 0 to 17 represents the 18 labels where the name of the feature is indicated: the one that corresponds to each channel and its location number in the matrix.
Figure 8. Confusion matrix with 9 features for each Vertical EOG (Table 7) and Horizontal EOG (Table 8), each number from 0 to 17 represents the 18 labels where the name of the feature is indicated: the one that corresponds to each channel and its location number in the matrix.
Sensors 23 04553 g008
Figure 9. KNN algorithm. Two combinations of neighbors (K) were used, with K = 4 and K = 10, and the nearest neighbor was K = 1. The algorithm training percentage of 80% and 20% testing and with seed = 4. As the signal changed, the ROC curve took a sudden change; this was derived from the fact that the first two movements presented similarities in the voltage amplitude (look up and look down). The eye movement transition was noticed when the blinking movement was performed followed by the left and right movements, derived from the fact that the voltage had a significant range of change at the first movements; this was noticed in the graph when resuming the classification of true positives. For the KNN algorithm it is problematic to have a classification when the signal presents similar data and when it is a large volume. It was also seen that the higher the volume of data, the further away the correct classification due to the number of calculations between distances.
Figure 9. KNN algorithm. Two combinations of neighbors (K) were used, with K = 4 and K = 10, and the nearest neighbor was K = 1. The algorithm training percentage of 80% and 20% testing and with seed = 4. As the signal changed, the ROC curve took a sudden change; this was derived from the fact that the first two movements presented similarities in the voltage amplitude (look up and look down). The eye movement transition was noticed when the blinking movement was performed followed by the left and right movements, derived from the fact that the voltage had a significant range of change at the first movements; this was noticed in the graph when resuming the classification of true positives. For the KNN algorithm it is problematic to have a classification when the signal presents similar data and when it is a large volume. It was also seen that the higher the volume of data, the further away the correct classification due to the number of calculations between distances.
Sensors 23 04553 g009
Figure 10. SVM algorithm. A Polynomial Kernel and a regularization parameter C = 14.5 were used, with a training percentage of 80% and 20% of data for testing, with a seed or random state equal to 4.
Figure 10. SVM algorithm. A Polynomial Kernel and a regularization parameter C = 14.5 were used, with a training percentage of 80% and 20% of data for testing, with a seed or random state equal to 4.
Sensors 23 04553 g010
Figure 11. DT algorithm. Implementation of 10 nodes. With a training percentage of 80% and 20% of test data with a seed or random state equal to 4.
Figure 11. DT algorithm. Implementation of 10 nodes. With a training percentage of 80% and 20% of test data with a seed or random state equal to 4.
Sensors 23 04553 g011
Figure 12. Lustration of training data with test data.
Figure 12. Lustration of training data with test data.
Sensors 23 04553 g012
Table 1. Details of reference EOG signal.
Table 1. Details of reference EOG signal.
Reference EOG Signal DetailsSamples Range
Eye movements down direction0–6500
Eye movements up direction6001–13,000
Eye blinks13,001–19,500
Eye movements in the left direction19,501–26,000
Eye movements in the right direction26,001–32,500
Table 2. Frequency domain EOG signal metrics.
Table 2. Frequency domain EOG signal metrics.
MetricDefinition
Root Mean Square (RMS)Continuous power without distorting the original signal.
AMPAmplifies when creating an amplifier object with default property value.
MaximumMaximum data of the frequency group.
VarianceA measure of dispersion that represents the variability of a data series with respect to its mean.
CovarianceValue reflecting the amount by which any variables vary jointly with respect to their arithmetic means.
MedianCentral variable of a data set.
AverageResult obtained by adding several quantities of the amount of data.
PspectrumReturns the scale of the frequency spectrum.
PowerSum of the absolute squares of its time domain samples divided by the length of the signal.
Table 3. Labeling of eye movements with their assigned class for input into the classification algorithm.
Table 3. Labeling of eye movements with their assigned class for input into the classification algorithm.
MovementClass
Down0
Blink1
Up2
Left3
Rigth4
Table 4. Results of the Wavelet application on the vertical EOG channel.
Table 4. Results of the Wavelet application on the vertical EOG channel.
Vertical EOG—Entropy
Wavelets Families
Levelhaarcoifsymfkmeyrbiorbio
10.62380.3530.62380.68940.62380.62380.6238
21.43510.81951.43511.24391.43511.43511.4351
32.24161.93322.24162.15862.24162.24162.2416
42.89552.66372.89552.9372.89552.89552.8955
53.22583.16343.22583.41613.22583.22583.2258
Table 5. Wavelet application results on the Horizontal EOG channel.
Table 5. Wavelet application results on the Horizontal EOG channel.
Horizontal EOG—Entropy
Wavelet Families
Levelhaarcoifsymfkmeyrbiorbio
10.22440.90210.22440.26850.22440.22440.1685
20.83620.28630.83620.97360.83620.83620.6736
31.56581.25241.56581.48081.56581.56581.4808
42.17161.99012.17162.12882.17162.17162.1288
52.72212.60092.72212.69852.72212.72212.6985
Table 6. Results of the Entropy method on the Reverse Biorthogonal family members of the Vertical EOG channel.
Table 6. Results of the Entropy method on the Reverse Biorthogonal family members of the Vertical EOG channel.
Biorthogonal Wavelet Entropy
Vertical
Reverse Biorthogonal Family Members
Level1.32.22.63.13.53.95.51.52.42.83.33.74.46.8
10.62410.00380.00380.00140.00140.00140.0040.6240.00380.00380.00140.00140.00330.0039
21.45130.52950.53690.18260.19880.20570.16631.45020.54360.550.17420.1850.25970.1443
32.32741.77741.85791.62011.68991.70661.68972.34521.82731.84521.67311.68621.71561.756
42.93932.75572.75032.92522.96032.95172.38442.98312.76822.80422.95612.92222.53592.6123
53.26593.20663.19133.14623.10813.19522.62383.25323.17163.17343.15253.15682.85982.867
Table 7. Results of Entropy application to different members of the Reverse Biorthogonal family of the Horizontal EOG channel.
Table 7. Results of Entropy application to different members of the Reverse Biorthogonal family of the Horizontal EOG channel.
Biorthogonal Wavelet Entropy
Horizontal
Reverse Biorthogonal Family Members
Level 1.32.22.63.13.53.95.51.52.42.83.33.74.46.8
10.22446.92 × 10 6.92 × 10 04 6.92 × 10 04 6.92 × 10 04 6.92 × 10 04 4.50 × 10 03 2.24 × 10 01 6.9 × 10 04 6.92 × 10 04 6.92 × 10 04 6.92 × 10 04 0.00280.0028
20.84950.14450.14930.03150.03870.04340.03020.84370.14020.14850.04690.05350.04860.0346
31.63241.11731.17470.99131.06521.06741.00881.65061.15581.19261.0431.0581.05871.1081
42.27232.02972.1012.29612.22722.26521.7642.32312.07042.14082.29492.20941.87141.966
52.79882.61472.64592.84912.89982.83392.34692.82462.61032.65272.86932.87122.42072.4695
Table 8. Parameters and characteristics of the EOG signal Horizontal channel.
Table 8. Parameters and characteristics of the EOG signal Horizontal channel.
CharacteristicHorizontalTPTNFPFN
Root Mean Square (RMS)RMSH (0)136.7801.8841
AMP AMPH (1)183.50.363.423
VarianceVarianceH (2)176.661.222.30405
AverageAverageV (3)179.720.0511.966
MediumMedianaH (4)179.391.1510.8329
CovarianceCovarianzaH (5)116.052.50.6645
MaximumMaxH (6)176.302.930.1949
PspectrumPspectrumH (7) 180.360.00621.09084
PowerPowerH (8)182.801.9370.0296
Table 9. Parameters and characteristics of the EOG Signal Vertical channel.
Table 9. Parameters and characteristics of the EOG Signal Vertical channel.
CharacteristicVerticalVPVNFPFN
Root Mean Square (RMS)RMSV (9)181.870.31830.9022
AMPAMPV (10)175.760.1032.7607
VarianceVarianzaV (11)177.280.954971.65257
AveragePromedioV (12)182.590.78121.166
MediumMedianaV (13)179.430.07590.468
CovarianceCovarianzaV (14)177.771.893970.71257
MaximumMaxV(15)173.952.94540.071
PspectrumPspectrumV(16)183.030.9521270.033
PowerPotenciaV(17)181.721.18410
Table 10. Calculation of confusion matrix channel EOG Horizontal EOG.
Table 10. Calculation of confusion matrix channel EOG Horizontal EOG.
CharacteristicHorizontalSensitivitySpecificityAccuracyPrecision
Root Mean Square (RMS)RMSH (0)34.7210093.73100
AMP AMPH (1)22.6099.5795.4273.52
VarianceVarianzaH (2)30.2698.4395.4345.04
AveragePromedioV (3)33.7899.9397.3595.14
MediumMedianaH (4)54.6498.5797.3839.84
CovarianceCovarianzaH (5)60.2486.5280.4128.57
MaximumMaxH (6)83.6896.3095.8725.44
PspectrumPspectrumH (7) 47.8499.9998.4534.12
PowerPotenciaH (8)98.0397.7297.5534.12
Table 11. Calculation of confusion matrix channel EOG Vertical EOG.
Table 11. Calculation of confusion matrix channel EOG Vertical EOG.
CharacteristicVerticalSensitivitySpecificityAccuracyPrecision
Root Mean Square (RMS)RMSV (9)52.6399.6298.3745.87
AMPAMPV (10)26.5999.8696.1490.66
VarianceVarianzaV (11)37.7398.7896.5451.28
AveragePromedioV (12)46.1699.0697.5556.14
MediumMedianaV (13)68.1199.9097.2634.55
CovarianceCovarianzaV (14)58.4797.6296.5734.60
MaximumMaxV (15)93.3796.1695.8725.34
PspectrumPspectrumV (16)96.805498.8698.6751.28
PowerPotenciaV (17)45.8798.5798.3945.87
Table 12. Sensitivity and specificity of algorithm KNN.
Table 12. Sensitivity and specificity of algorithm KNN.
Cutting PointSensitivitySpecificity
0.550%50%
Table 13. Sensitivity and specificity of SVM algorithm of the best classification.
Table 13. Sensitivity and specificity of SVM algorithm of the best classification.
Cutting PointSensitivitySpecificity
0.550%50%
Table 14. Sensitivity and specificity of algorithm DT.
Table 14. Sensitivity and specificity of algorithm DT.
Cutting PointSensitivitySpecificity
0.4357%43%
Table 15. Comparative results of the DT Algorithm, SVM and KNN in the Jaccard Index.
Table 15. Comparative results of the DT Algorithm, SVM and KNN in the Jaccard Index.
AlgorithmTrainTest
DT0.50.60526
SVM0.666660.76949
KNN0.411760.69458
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Hernández Pérez, S.N.; Pérez Reynoso, F.D.; Gutiérrez, C.A.G.; Cosío León, M.D.l.Á.; Ortega Palacios, R. EOG Signal Classification with Wavelet and Supervised Learning Algorithms KNN, SVM and DT. Sensors 2023, 23, 4553. https://doi.org/10.3390/s23094553

AMA Style

Hernández Pérez SN, Pérez Reynoso FD, Gutiérrez CAG, Cosío León MDlÁ, Ortega Palacios R. EOG Signal Classification with Wavelet and Supervised Learning Algorithms KNN, SVM and DT. Sensors. 2023; 23(9):4553. https://doi.org/10.3390/s23094553

Chicago/Turabian Style

Hernández Pérez, Sandy Nohemy, Francisco David Pérez Reynoso, Carlos Alberto González Gutiérrez, María De los Ángeles Cosío León, and Rocío Ortega Palacios. 2023. "EOG Signal Classification with Wavelet and Supervised Learning Algorithms KNN, SVM and DT" Sensors 23, no. 9: 4553. https://doi.org/10.3390/s23094553

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop