Neural Network Classification of Brainwave Alpha Signals in Cognitive Activities

The brain-wave signal is one of the typical characteristics produced by the body. Signals carry information and are represented in electrical signals produced from the brain in a typical waveform. Human brain wave activity will always be active even when sleeping. Brain waves will produce different characteristics in different individuals. Physical and behavioral characteristics can be identified from patterns of brain wave activity.

The signal produced by human brain waves is one unique feature. Signals carry information and are represented in electrical signals generated from the brain in a typical waveform. Human brain wave activity will always be active even when sleeping. Brain waves will produce different characteristics in different individuals. Physical and behavioral characteristics can be identified from patterns of brain wave activity. This study aims to distinguish signals from each individual based on the characteristics of alpha signals from brain waves produced. Brain wave signals are generated by giving several mental perception tasks measured using an Electroencephalogram (EEG). To get different features, EEG signals are extracted using first-order extraction and are classified using the Neural Network method. The results of this study are typical of the five first-order features used, namely average, standard deviation, skewness, kurtosis, and entropy. The results of pattern recognition training show that 171 successful iterations are carried out with a period of execution of 6 seconds. Performance tests are performed using the Mean Squared Error (MSE) function. The results of the performance tests that were successfully obtained in the pattern test are in the number 0.000994. researchers to obtain EEG signals. Some research work was completed using single-channel EEG signals [1] [12] [13].
To be able to measure brainwaves, stimulation is needed to stimulate the brain. The application of cognitive activity as a stimulus is one way to produce brainwaves that are specifically located in the realm of active thinking. Brain wave oscillation can be seen in Figure 1.
The ability to focus attention on a particular activity requires different concentrations of each person. Several factors, such as fatigue and the environment, become one of the causes of loss of concentration. The difficulty of concentrating is experienced by various occupations, both students and workers.
Implementation of meditation therapy in the process of measuring and recording EEG waves will significantly help reduce some disturbances from the environment, in addition to the application of meditation therapy can also help improve concentration on the stimulus provided. The application of meditation therapy used is hypnotherapy. The purpose of the application of hypnotherapy is to obtain EEG alpha waves without removing the concentration of the study subjects.
References [14] in research related to the effectiveness of hypnotherapy suggest that hypnotherapy is a conscious state in a person that involves focused attention characterized by an increased capacity to respond to suggestions. The statement regarding the state of hypnosis is also given by reference [15], hypnosis is the use of fantasy and imagination in a state of consciousness that modifies the attention and concentration of subjects involved with new possibilities for self-control and thinking.
This research work aims to distinguish signals from each individual based on the characteristics of alpha signals from brain waves produced. This research work explores human brain activity based on a cognitive perspective. Brainwaves are explicitly measured to gain cognitive activity from the brain. Therefore, appropriate stimulation is required. Providing the right stimulus will produce the right brainwaves. The stimulus in this research work is derived from several previous studies [2][9][16] [17]. Here, nine kinds of cognitive tasks are applied.
In this paper, EEG signals are obtained from participants by applying hypnotherapy first. The purpose is to get specific cognitive activity and focus from the brain. Chebyshev Filters and crosscorrelation methods are applied to obtain brainwave features. Each feature acquired is processed further by performing a matching process on each feature. Euclidean distance is applied to show the similarity level. At the end of the research work, a performance evaluation will be applied.
Based on Figure 1, the alpha signal is a signal representation in very comfortable conditions to deepen meditation. In the process of data acquisition, this condition is the best condition for the resource person, which is protected from sound disturbances and visual disturbances (focus disturbances). The resource person is expected to be able to focus on all the cognitive tasks given to obtain optimal results from the signal classification process and reduce the existence of natural noise. Hypnotherapy is applied in the data acquisition process to get specific alpha signals from the brain. In the classification process, neural networks are expected to be able to optimally acquire knowledge, generalize and extract from a particular data pattern, create a pattern of knowledge through selforganizing, have a fault tolerance, computation in parallel so that the process is shorter.

A. Related works
The application of single-channel EEG to research work [14] aims to detect mental states. There are two types of stimuli: each part consists of several sentences and isolated words. There are six easy and six difficult parts. In addition to the parts, there are 20 right words, 20 false words, and ten nonword words. Classification tasks are capable of generating 31 % simple classification accuracy for adults, 35 % for adults and children together, and 24 % for children.
Research [16] applies an EEG with a single channel to detect the level of attention. This research work focuses on alpha waves. Stimulus applied in the form of giving several questions. Interpretation of focus is seen from a combination of some information in the form of time taken to answer each question and the Number of correct and wrong answers. The results show there are as many as 35 % aware of the error in answering the question.
EEG analysis was also developed on the research work [17], which aims to establish a basic wave brainwave index (BBI). The stimulus used was a psychoanalysis test on 51 participants. The brainwaves observed focused on the beta waves. The analysis shows that PSD provides a reliable BBI with 80 % conformity.
Research by [12] classified sleep phase based on time domain features and structural graph similarity coupled with K-means clustering. The results of the research work found that 12 feature sets produced 95.93 % better performance for all stages of sleep.
The research work [18] reviews the application of EEG signals used for diagnosis, monitoring, and treatment in patients with epilepsy. The result of several multiparadigm approaches found that the processing of EEG signals using wavelets, linear dynamics, and chaos theory, as well as neural networks is the most effective method for the diagnosis of EEG-based epilepsy.

B. Brainwave Data
The data acquisition process was obtained using the Neurosky Mindset EEG tool. This EEG tool uses a single EEG sensor (called a single electrode). Electrode placement is based on the 10-20 system [19] [20]. The placement of the electrode position in this Neurosky Mindset EEG device based on the 10-20 system is in the position of FP1, which is in the position of the frontal lobe.
In this study, four men and four women were included as EEG Subjects, with EEG signals as objects. The data acquisition process is carried out in two different times. The retrieval process is carried out for 20 seconds. The sampling frequency used in data acquisition is 128 Hz per second.

C. Cognitive Task
Brain cognitive activity is based on several studies related to psychological perception. This cognitive activity aims to get a specific response from the cognitive activities of the brain (called cognitive tasks).
There are nine cognitive tasks involved in the data acquisition process of this research, including breath, color, face, fingers, mathematics, objects, password thinking, singing, and sports. These nine types of cognitive tasks are based on previous research [18]. In Table 1, it can be seen a description of the cognitive tasks of the brain along with detailed work instructions for each person.

D. Feature Extraction
In this study, feature extraction using statistical features first order based on the characteristics of the histogram. First-order feature extraction is better at presenting measurable parameters, including mean, skewness, standard deviation, kurtosis, and entropy. The first-order characteristic value then becomes input value in the classification process.
EEG data obtained after feature extraction are grouped according to three categories, including cognitive assignments, time data collection, and subjects. The mean represents data distribution. The standard deviation represents the variation of data. The skewness represents the rate of diffusion of asymmetric data. The kurtosis represents the high-low distribution of data to normal distribution and randomness. The entropy represents the size of the distribution data. Five statistical features can be calculated using (1) to (5).

E. Proposed Method
The General Procedure of the Proposed Method can be seen in Figure 2. EEG data obtained from data acquisition using the EEG Neurosky Mindset tool filtered first using bandpass filters with a frequency range of 8 to 12 Hz. Neural Network Classification with the backpropagation algorithm supervised learning algorithm where the learning process is carried out during training data. Input data This task is given as a brain stimulus to remember colors. Subjects are shown several colors in a certain order to be remembered, then subjects are asked to mention nonverbally the color sequence according to their memories. This stimulus is carried out quietly for 20 seconds. Simulated Movement Finger

Finger
This task is a stimulus task focused on the finger. Without moving a finger, the subject is asked to imagine moving a finger. This stimulus is carried out with a measured tempo of 20 seconds by closing the eyes.

Face
This task focuses on simulating a person's face known to the subject. The subject was asked to close his eyes and reconstruct the person's face. Without body movements and sound, this stimulus is carried out for 20 seconds.

Simulated Object Reconstruction
Object This task focuses on the detailed simulation of object reconstruction. The subject is shown one object in a limited time. Then for 20 seconds, the subject is asked to close his eyes and reconstruct the object in detail without making a gesture and making a sound. Mathematical Task

Math
This task serves to stimulate the brain to do simple mathematical calculations. The calculation includes addition, subtraction, multiplication, and division. The subject will be shown some mathematical calculation questions. The subject is given 20 seconds to answer the question without making a sound. Wrong answers and correct answers are ignored in this task.

Pass-Thought
This task focuses on the brain stimulus to remember passwords in the form of sentences consisting of a combination of letters and numbers. The subject is shown a line of passwords that must be remembered. The subject is asked to close their eyes and repeat the password without making a sound. This stimulus is carried out for 10 seconds.

Song
This task focuses on the brain stimulus in repeating song lyrics. This stimulus is carried out without movement and sound. By closing the eyes, the subject is asked to imagine repeating the preferred song lyrics in sequence for 20 seconds. Simulated Sport Task   Sport This task focuses on simulating the preferred sports movement. This stimulus is carried out in silence and without movement. Within 20 seconds, the subject was asked to imagine doing the preferred sports movement.
on input neurons are used as training data, which will be continued to output neurons as output data. Each network is given a weight, if the output value is not following the expected value, there will be an improvement in weight and propagated back to spread to the previous neuron network. After the classification stage is complete, a matching phase is carried out by applying the Euclidean distance and the evaluation phase of the classification results.

III. Results and Discussions
The EEG data that has been obtained from the acquisition is extracted to acquire the typical characteristics of the EEG Signal. Feature extraction is used based on first-order statistical features: average, standard deviation, skewness, kurtosis, and entropy.
Total of 72 EEG data obtained in the primary are grouped by subject, cognitive task (stimulus), and retrieval time. The sources involved in this study were eight people with twice the time of data collection and involving nine cognitive tasks. Data is filtered first specifically using the 8 to 12 Hz frequency. EEG data is focused explicitly on alpha waves. In Figure 3, the filter design for the EEG signal is used. Furthermore, the data is extracted using first-order features to obtain 144 variables for each feature. Table 2 shows the features produced after the extraction process is carried out.
To get the same range of results, the normalization process is performed on the feature extraction results so that the range of values is -1 to 1. The feature extraction after normalization can be seen in Table 3. The comparison histogram of feature extraction results before and after extraction can be seen in Figure 4. The next step is to match the feature data using the normalized Euclidean distance. The smaller the score, the more similar the two feature vectors are matched. Conversely, the bigger the score, the more different the two feature vectors will be. The properties of the normalized Euclidean distance are the results in the range0 ≤ ̅ ( , ) ≤ 2. Table 4 and Table 5 show the results  Table 4 shows that the score is in the range between0 ≤ ̅ ( , ) ≤ 2. Therefore, it can be concluded that the two matching vectors have no similarities between the two.
Pattern recognition tests are carried out by using five input layers (mean, standard deviation, skewness, kurtosis, and entropy), the first layer using ten hidden layers, the second layer using two hidden layers and the last using six output layers. The network architecture for testing patterns using multilayer perceptron neural network (NN) methods can be seen in Figure 5. After determining the hidden layer, the second step is to determine the test data and training data from all existing data first. The third step is to determine the target pattern from the output. The final step is to determine training using a learning rate of 0.1 with a momentum of 0.95 and a training time of 10,000. The activation function used uses the sigmoid function. The entire EEG data obtained was collected based on the subject or test so that EEG data was obtained per subject. The results of the pattern recognition test can be seen in Figure 6.  The pattern recognition training results in Figure 6 show that 171 successful iterations were carried out with a period of the execution time of 6 seconds. The performance test results can be seen in Figure  7. Performance tests are performed using the Mean Squared Error (MSE) function. MSE has a function to measure network performance according to the average squared error. The performance test that was successfully obtained in the pattern test is at the number 0.000994 with the success parameters of the test on MSE as much as 0.001 (1 × 10 -3 ) with repetition iterations of 171. Figure 7 shows the best validation performance of the neural network and shows the training, validation, and test curves of the training process. The minimum gradient is decided as 1 × 10 -3 for the purpose of the training process. Training has reached the goal of the 171 epochs. The regression plot of the training results can be seen in Figure 8, and the Throughput of training status for 171 epoch neural networks is shown in Figure 9.
In Figure 8, the plot shows the approximate amount of output that deviates from the actual target. The ideal case is the exact same output and target, in this case, the actual deviation lies in the dashed line, as shown in the plot. In general, the output will definitely deviate from the target. This deviation is indicated by the blue line. The training state data is shown in Figure 9. In Figure 9, changes in gradient and learning rate of neural networks and the number of validation examinations occurred 171 epochs during the process of training neural networks. The output of this training process shows the state of a successful neural network. Accuracy Test is calculated using the false acceptance rate (FAR) method and the false reject rate (FRR). Referring to sub-section 2.6 about testing accuracy. Calculations are carried out using (6) to (8). Accuracy test results can be seen as follows: = 8/8 × 100 % = 100 % (6) = 0/8 × 100 % = 0 % (7) = (1 − ) × 100 % = 100 % The accuracy test also calculates the minimum error using (9) = min( + ) = min(1 + 0) = 1 (9)

IV. Conclusion
The results of this study indicate the process of identifying alpha signals from brain waves based on the characteristics of the features of the subject. To get the characteristics of features contained in the EEG signal of each individual that can be specifically identified using the five first-order statistical features used, namely the mean, standard deviation, skewness, kurtosis, and entropy. The results of the pattern recognition training in the form of classification of EEG signals using neural networks with the backpropagation algorithm showed that there were 171 successful iterations carried out with a period of execution time of 6 seconds. Performance tests are performed using the MSE function. The results of the performance tests that were successfully obtained in the pattern test are at 0.000994 with the success parameters of the test on MSE as much as 0.001 (1×10 -3 ) with repetition iterations of 171. Based on the evaluation results, identification of alpha brain wave signals is absolutely successful, with a FAR value of 100 %.