Abstract
Keywords
Introduction
Encephalopathy is proved to be one of the major diseases threatening human health in recent years. 1 Electroencephalography (EEG), near-infrared spectroscopy (NIRS), magnetic resonance imaging (MRI), functional magnetic resonance imaging (fMRI), positron emission tomography (PET), magnetoencephalography (MEG), and other advanced modalities are utilized separately or jointly for encephalopathy monitoring, medical diagnosis, and functional rehabilitation.2–5 The EEG is the only non-invasive measure for neuronal function of the brain, and kinds of encephalopathy can be assessed by using EEG. 6 Generally, current monitoring by EEG devices is inpatient due to the huge volume.7–9 Therefore, when patients are out of hospital, their rehabilitation conditions cannot be tracked real-timely. Fortunately, wearable solutions were proposed by several researchers.10,11 Patients can undergo ambulatory monitoring anywhere with a wearable device.12,13 Moreover, the continuous recordings obtained from these outpatient wearable devices are beneficial for monitoring and rehabilitation after diagnosis. 1 These devices will become a potential diagnostic tool in the near future. However, it still cannot meet the requirements of daily monitoring and patients’ health self-management depending only on such a device. The main reasons can be concluded as follows: (a) lacking of the life-oriented device which is easy to be accepted in public; (b) the patients cannot understand the meanings of the recordings without the help of doctors and indicators, for example, a yes/no outcomes for warning, which are easily understood and what they need deeply; and (c) for healthcare big data, it is better to collect and store the recordings in a cloud terminal. As a result, in this article, we concentrate on developing a wireless wearable EEG system, called Brain-Health, to solve these problems.
The main contributions of our Brain-Health system are as follows: (a) the monitoring device for EEG data collecting, including acquisition sensors, signal processing chip, and Bluetooth, attached to a sport hat or elastic headband; (b) the mobile terminal with dedicated application (APP) for EEG continuous recording, displaying, and real-time monitoring; and (c) the classification algorithm applied to encephalopathy in clinical for early warning based on intelligent Support Vector Machine (SVM). The monitoring is crucial in many clinical applications of encephalopathy. 14
In order to evaluate the performance of the Brain-Health system, we collect three groups of EEG data: comatose patients of hepatic encephalopathy (HE, Group 1), rehabilitated patients of HE (Group 2), and normal controls (Group 3). The results prove the fact that HE patients are correlated with abnormal EEG and their basic rhythms gradually become slow.15–17 Furthermore, our Brain-Health system achieved the high accuracy of about 91.79% and 93.89% corresponding to the classification of Group 1–Group 2 and Group 1–Group 3 based on SVM. In conclusion, the good performance and high accuracy indicated the feasibility and effectiveness of our Brain-Health system for encephalopathy daily monitoring, health self-management, and clinical medical research.
Methods
There are two key sections in this part: participants selecting (section “Participants”) and Brain-Health monitoring system developing (section “Brain-Health system”), including the overview of the system (section “Overview of the system”), EEG acquisition device (section “EEG acquisition device”), mobile APP (section “Mobile application (APP) for daily monitoring”), and classification algorithm based on SVM (section “Classification algorithm based on SVM”).
Participants
In total, 15 participants from the Second Hospital of Nanjing are selected in this study: five HE comatose patients (Glasgow Coma Scale (GCS) score: 3–8 points, mean age: 41.8 ± 11.5), five HE rehabilitated patients (GCS score: 14–15 points, mean age: 42.8 ± 14.3), and five normal controls (GCS score: 15 points, mean age: 38.2 ± 12.1, no physical or mental problem), where the GCS score is a standard generally applied for evaluating the state of cognition in clinical, and the higher the score, the better the state of cognition (full score: 15 points). This research is approved by the Institutional Review Board (IRB) and Ethical Committee of the Second Hospital of Nanjing. Written informed consents are obtained from all participants.
Brain-Health system
Overview of the system
The overview of Brain-Health monitoring system is shown in Figure 1. The system consists of seven major modules: EEG acquisition, EEG pre-processing, microcontroller, power supply, communication and positioning, mobile terminals, and cloud storage. Briefly, these modules can be categorized into two parts: hardware part (modules a–e) and software part (modules f and g). In addition, an effective classification algorithm is proposed and can be embedded in software part. The key contributions of Brain-Health system are concluded in the “EEG acquisition device,”“Mobile application (APP) for daily monitoring,” and “Classification algorithm based on SVM” sections.

General architecture of system: (a) EEG acquisition module, (b) EEG pre-processing module, (c) microcontroller module, (d) power supply module, (e) communication and positioning module, (f) mobile terminals module, and (g) cloud storage module.
EEG acquisition device
Two kinds of daily wearing appearance are designed in our EEG device: the sport hat (Figure 2(a) and (c)) and the elastic headband (Figure 2(b) and (d)). Life-oriented appearances both are suitable for indoor and outdoor. We can change circumference flexibly according to the different sizes of the patient’s head in both designs. From Figure 3, the details of the main parts of schematic circuit diagram are introduced as follows:

Two kinds of appearances of wearable EEG device: (a) and (b) schematic diagram of appearances, (c) and (d) pictures of appearances.

Main parts of schematic circuit diagram.
Hardware circuit has the small volume of 4 cm ×2 cm × 1 cm and low current consumption of 44 mA. The above parameters meet design requirements of wearable EEG devices.
Mobile application (APP) for daily monitoring
A dedicated APP for encephalopathy daily monitoring is conducive to record EEG signal timely and help to understand the meanings of the recordings easily by patients themselves (shown in Figure 4). The stream data are sent to the APP via Bluetooth, and the APP interface will show the EEG recording in milliseconds. Meanwhile, the data will be passed to the cloud though the mobile terminal by network. The cloud will run program and return the results to APP, and thus, the warning algorithm and daily monitoring are realized. Many practical functions are developed in main user interface: EEG data recording, history searching, and encephalopathy knowledge. In addition, Emergency Call module is presented for patients calling to relatives and hospital when they suffer from sudden encephalopathy attack.

The mobile application (APP) interfaces: (a) login interface, (b) main interface, (c) data recording interface, and (d) history searching interface.
Classification algorithm based on SVM
It will be dangerous when a patient falls into encephalopathy attack suddenly. Therefore, an effective classification for timely early warning is very important for encephalopathy daily monitoring. As a result, taking HE as an example, we propose a useful classification algorithm based on SVM. The main reason for choosing the SVM is that this method often provides considerably better classification performance than other algorithms on small data set.
HE
HE is a common encephalopathy; the patient’s clinical manifestation is verified that EEG wave basic rhythm gradually slows down.15,16 The normalized spectral power of α1 (8–10 Hz), α2 (10–13 Hz), β1 (13–17 Hz), and β2 (17–30 Hz) will all decrease while δ wave (1–3 Hz) increases. The ratio of α1/δ, α2/δ, β1/δ, and β2/δ will become even smaller than before. Based on this fact, we propose an early warning algorithm based on SVM by selecting above nine features, including five relative spectral powers and four spectral power ratios: δ, α1, α2, β1, β2, α1/δ, α2/δ, β1/δ, and β2/δ.
Main idea behind SVM
Generally speaking, given
where
Criteria of performance evaluation
Matthews correlation coefficient (MCC) is an important criterion, which is used commonly to assess a classifier’s performance. It can be calculated as
It can be seen from formula (3) that the MCC values will fall into [−1,+1]. Note that the higher the value, the better the classifier’s performance. MCC = 0 implies the predictive ability of a classifier equivalent to random guess, where the P00, P01, P10, and P11 are defined by a confusion matrix as shown in Table 1.
A confusion matrix.
During receiver operating characteristic (ROC) curve analysis, we can find the relationship of sensitivity (or true positive rate) and false positive rate (or 1-specificity). Generally, the ROC curve of random classifier is used as a baseline. The further the ROC curve from the baseline, the classifier shows the better the prediction performance. A good classification model should be as close as possible to the upper left corner or coordinate (0, 1). Here, the random classifier adopts the strategy of random guessing, which is randomly classified that half of the samples are positive and the other half are negative.
The area under the curve (AUC) indicates the area under the ROC curve and has been accepted as the standard measure for assessing the accuracy of a classification model. The values of AUC fall into [0, +1]; a larger value indicates better performance of classifier. Typically, the value is between 0.5 and +1.0, where 0.5 corresponds to the random classifier and +1.0 to the perfect classifier with 100% accuracy.
Details of classification algorithm
In our work, the details for our classification algorithm for early warning based on SVM are concluded as follows:
Sampling frequency is 512 Hz of our wearable device and every feature can be calculated per second based on the corresponding 512 EEG recordings. Due to the EEG is a kind of non-stationary signal, each sampling is identical independent with each other. Hence, in order to expand the database, one sample can be selected randomly from every continuous 10 samples as a database (Uniform Distribution is adopted, for that every value is chosen with the same possibility).
Due to the imbalance of the data size in different groups, we randomly select 100 samples from each volunteer and divide them into five sets, where the four sets are for training and the rest one for testing. Note that a total of 15 volunteers and 100 × 15 = 1500 samples are contained in the database from all volunteers including 1200 samples as training and the remaining 300 as testing.
Fivefold cross-validation is used in the training phase to make the results more reliable. The cost value
Six important criteria are calculated for performance evaluation in testing group: accuracy, sensitivity, specificity, ROC curve, AUC, and MCC.
The main pseudocode of classification algorithm based on the SVM is presented in Algorithm 1.
Procedure
In total, 15 volunteers are required to close their eyes without tranquilizer in a quiet state equipped on our Brain-Health device. And the EEGs are simultaneously recorded in the connected smart phone. Then, the nine features mentioned above constitute a feature space. Next, the classification in groups can be derived using SVM algorithm. Finally, six important criteria for performance evaluation are calculated compared with linear discriminant analysis (LDA) algorithm. In brief, the fundamental principle of LDA is that to find a linear decision boundary, which can minimize the intra-class variance and maximize the between-class variance, where the LDA is a common tool used as a reference of classification and pattern recognition.
We do two-tailed
Results and discussion
The results show that significant differences of normalized spectral power are found in HE comatose group compared with rehabilitated group and normal controls (Figure 5). Particularly, the normalized spectral power of low frequency wave (δ) significantly increases in HE comatose group (

Normalized spectral power distribution in different EEG frequency bands.
In the first classification (HE comatose group and rehabilitated group), the details of the performance provided by the SVM compared with LDA algorithm are tabulated in Table 2. Regarding the overall classification results, the SVM provides a better performance of mean accuracy of 91.79%, sensitivity of 87.33%, specificity of 96.04%, AUC of 0.92, and MCC of 0.84, while the evaluation standards fell to mean accuracy of 74.23%, sensitivity of 86.95%, specificity of 61.54%, AUC of 0.74, and MCC of 0.51 based on LDA. From the results, we can see that the proposed algorithm results in an improvement with accuracy of 17.56%, sensitivity of 0.38%, specificity of 34.5%, AUC of 0.18, and MCC of 0.33, which indicates that the classification performance based on SVM is better than LDA. Note that the sensitivity and specificity should be analyzed conjointly rather than separately. Although the sensitivity based on LDA is slightly better than SVM using some features, absolutely poor performance of corresponding specificity is presented as well. Similarly, Table 3 summarizes the evaluation criteria of the second classification (HE comatose group and normal controls) based on SVM and LDA, respectively. The SVM algorithm achieves an improvement with accuracy of 17.81%, specificity of 38.04%, AUC of 0.18, and MCC of 0.32 compared with LDA algorithm.
Performance of SVM compared with LDA algorithm in Classification 1 (mean values).
SVM: Support Vector Machine; LDA: linear discriminant analysis; AUC: area under the curve; MCC: Matthews correlation coefficient.
Performance of SVM compared with LDA algorithm in Classification 2 (mean values).
SVM: Support Vector Machine; LDA: linear discriminant analysis; AUC: area under the curve; MCC: Matthews correlation coefficient.
The ROC curves of above-mentioned two classifications are shown in Figure 6. For a comparison, the ROC curve of random classifier is used as a baseline which sensitivity identically equal to 1 – specificity (AUC = 0.5). In general, the ROC curve of SVM is closer to coordinate (0, 1) and further away from the baseline than LDA both in two classifications, which confirm the superior classification performance of the SVM.

ROC curves of two classifications using SVM compared with LDA algorithm. Feature vector = [δ, α1, α2, β1, β2, α1/δ, α2/δ, β1/δ, β2/δ]. (a) Classification 1: classify comatose group and rehabilitated group (AUC of SVM = 0.93, AUC of LDA = 0.83) and (b) Classification 2: classify comatose group and normal controls (AUC of SVM = 0.94, AUC of LDA = 0.88).
In conclusion, the results have shown the significant difference with normalized spectral power between the comatose group and the other two groups, which is verified that the abnormal performance of EEG can be collected by our system. And the results indicate that the EEG has a characteristic pattern according to the consciousness level. Meanwhile, the results of above two classifications have shown that the performances of SVM are better than the LDA, which is verified by the feasibility of SVM algorithm for HE classification.
Conclusion and future work
In this article, we propose a real-time wireless wearable EEG system based on SVM for encephalopathy daily monitoring, named as Brain-Health. An innovative technology, which takes advantage of (a) the wearable EEG acquisition device, (b) the mobile terminal with the dedicated application, and (c) the intelligent classification algorithm based on SVM, is introduced in our Brain-Health system. The results demonstrate that the good performance of accuracy, sensitivity, specificity, AUC, MCC, and ROC curve is achieved in classifications based on SVM, which indicate the feasibility and effectiveness of our Brain-Health encephalopathy monitoring system.
In the future, we will focus on the following: (a) collect EEG data from more volunteers and optimize algorithm to improve the performance of classifier; (b) enrich the function and improve real-time response speed of mobile APP—meanwhile, strengthen the construction of the cloud for analysis and storage of the EEG recordings; and (c) extract and analyze different features applied to another encephalopathy, such as epilepsy, attention-deficit/hyperactivity disorder (ADHD), and Alzheimer’s disease (AD).
