EEG Classification while Listening to Murottal Al-Quran and Classical Music using Random Forest Method

ABSTRACT


I. Introduction
The anatomy of the human brain is divided into three main parts: cerebrum, cerebellum, and brainstem.The largest part of the brain is the cerebrum, which consists of 200 million neurons that connect the left and right hemispheres.On the brain's surface is a gray matter called the cerebral cortex.The cerebral cortex is mostly folded in humans, allowing for millions of additional neurons.This greeting differs from the cerebral cortex in animals, which does not have folds this large.This difference allows humans to read, speak, stretch, write poetry, sing, and do other things.In the frontal lobe, motor areas generate impulses for voluntary movements.In the motor frontal region is the premotor zone, where managing the motor skill being learned requires a series of movements.The prefrontal or orbital cortex is the part of the frontal lobe that lies just behind the eyes.This area includes such things as maintaining an appropriate emotional response to a situation, being aware that there is a standard of behavior (a cardinal law or rule or simple decency), respecting it, and predicting and planning for the future [1].The transition from adolescence to adulthood is marked by an increase in This study is aimed to classify the brain activity of adolescents associated with audio stimuli; murottal Al-Quran and classical music.The raw data were filtered using Independent Component Analisys (ICA) and followed by band-pass filter in Python on the Google Colab Extraction was processed with Power Spectral Density (PSD) and the Random Forest Method in Weka Machine Learning was used for classification.The research results showed the same results between the two types of stimulation, namely the order of brain waves from highest to lowest were delta, alpha, theta and beta.The average brain waves of teenagers when given murottal al-Quran stimulation were 45.32% delta, 31.60%alpha, 17.02 theta and 6.05% beta.Meanwhile, the average brain waves of teenagers when given classical music stimulation were 46.54% delta, 28.64% alpha, 19.21% theta and 5.50% beta.Classification is obtained with the best value that frequently appears (mode) from the prediction results for each sample using random forest methods.The accuracy, precision, and recall of classifying adolescent brain waves when given murottal and classical music stimuli using the Random Forest method with cross-validation technique (optimum at k-fold=5) were 65.38%, 76.92%, and 70.00%, respectively.The results of this study show that stimulation using murottal al-Quran and classical music effectively improves adolescent relaxation conditions.high-level cognitive abilities and improvements in the structure and function of the parts of the brain that support them [2].
The electric currents that travel between neurons are called brain waves because they are like cyclic waves.The relationship between temporal frequency and the spatial distribution of synaptic activity predicted brain waves.Such a dispersion relationship, which essentially defines a more general phenomenon as a wave, is shown to limit the spatial-temporal dynamics of synaptic action with many experimental Electroencephalogram (EEG) consequences [3].In Bataineh & Jarrah [4], EEG records physiological signals from electrophysiological processes of brain electrical activity using electrodes placed on the scalp.The results of EEG studies show that there are four main types of brain waves: delta, theta, alpha, and beta.These studies also show that these brain waves correlate with state of mind [5].EEG produces a signal that is a discrete-time (i.e., with many dimensions) multivariate time series.The number of EEG channels determines the dimensions of each point in the time series.Each time point corresponds to an EEG sample obtained at the same time point.The number of points in the time series depends on the time recorded and the sampling rate.This raw signal is rarely used because it includes DC offset and drift, electromagnetic noise, and artifacts that must be filtered out [4].
Adolescent deviant behavior can affect brain and cognitive development, leading to cognitive impairment, which in turn becomes a vicious cycle of perpetuation of deviant behavior.These deviations can take the form of eating disorders [6], drug abuse [7], and cognitive negativity [8].Brain stimulation approaches have been widely used to gain causal mechanistic insights into the relevance of the brain's neurophysiological and/or functional systems for human cognitive function.In previous literature studies, transcutaneous vagus nerve stimulation (tVNS) has been reviewed, which is a noninvasive brain stimulation technique based on vagus nerve stimulation.This stimulation can potentially enhance cognition, particularly the possibility of enhancing certain memory functions [9].Another stimulation often used for therapy in adolescents is classical music.Classical music has been shown to have positive effects in the fields of autism spectrum disorders and neonatal care [10].In addition, traditional music therapy for 10 weeks reduces students' anxiety and aggression [11].However, other research shows that listening to classical music for 60 days causes a significant decrease in participating students' anxiety levels and a significant improvement in their level of subjective well-being [12].Furthermore, listening to the Murottal Al-Quran can be an alternative therapy for adolescents.Previous research has shown that listening to Murottal Al-Quran can reduce the Anxiety Level of Grade IX Students in Facing Exams at Junior High School Muhammadiyah 1 Kalirejo, Central Lampung [13].Combining yoga and Murottal Al-Qur'an has been shown to reduce the dysmenorrhea pain scale in adolescents by increasing beta-endorphin levels [14].Moreover, combining classical and murottal music can reduce pain levels in breast cancer patients [15].This study used the stimulus murottal Al-Quran and classical music because both of them had a positive effect on reducing the sample's anxiety and increasing cognitive ability.Research conducted by Norsiah and Amira [16] showed a significant increase in the scores obtained by participants before and after listening to the chair verse.Neurologist Majid [17] found a relationship between memorizing the Koran and increasing scientific thinking and discoveries.When memorizing the Koran, the temporal lobes are for learning and remembering.Another study by Abdurrochman [18] on the influence of listening to classical music, relaxing music, and reading the Koran.The results showed that the subject's brain waves were dominated by alpha waves when listening to classical and relaxing music, while delta waves dominated the brain waves when listening to murottal Al-Quran.Similar research by Abdullah & Omar [19] on brain waves when listening to the Koran and rock music.The results showed that listening to the recitation of the Koran produces Alpha waves and helps individuals to be calm compared to listening to rock music.
Research on identifying patterns in brain activity that correspond to certain stimuli, especially the relationship between sound stimuli and brain waves, is of particular concern.Previous research by Rahman et al. [20] identified the relationship between musical stimulus and brain waves and analyzed the effects of 3 different musical genres.Statistical features are extracted from signal classification models based on K-nearest Neighbor (KNN), Support Vector Machine (SVM), and Neural Network (NN).This study shows that NN and Genetic Algorithm (GA) feature selection, can achieve the highest accuracy of 97.5% in classifying 3 music genres.This model also achieved 98.6% accuracy in classifying music based on the participants' subjective emotional ratings.Another study by Sumarti et al. [21] compared several data classification methods (SVM, Naive Bayes, Multi-Layer Perceptron (MLP), Multiclass classifier, and Random Forest) to differentiate malignant and benign cancer based on textural features with not too large differences in data, showing that the random forest method is the best method with an accuracy of up to 100%.So, we use the random forest method for this study.
This study uses the mne library with the Independent Component Analysis (ICA) algorithm and a bandpass filter to filter the raw data of the EEG wave signal in order to obtain the real signal.This is based on previous research by Winkler et al. [22], which shows that ICA and Band-Pass filters can remove artifacts and significantly improve the SNR (Signal to Noise Ratio) and accuracy.Data management uses Google Colab because it has proven to be efficient and effective in processing data quickly and the necessary libraries are available without installing it first [23].
No previous study used the random forest method to examine the classification of brainwave with the stimulus of listening to murottal Al-Quran and classical music.This study looks for brain activity patterns based on frequency (delta, theta, alpha, and beta) in adolescents associated with audio stimuli using murottal Al-Quran and classical music.Knowing this pattern can be used to determine the difference between stimuli using murottal Al-Quran or classical music.It can determine the best method for voice therapy in adolescents.

A. Research Instrument
This research uses Electroencephalography (EEG), type Contec KT88, to measure weak electromagnetic signals originating from nerve impulses in the brain.Data collection uses EEG with 16 channels and 2 additional channels.Data is generated every 1 second with a wave amplitude of 7.5 mm/50μV and a speed of 30mm/s.Data on these signals is useful for classifying brain activity.Meanwhile, the audio recording is used as a sample in listening to the stimulus murottal Al-Quran Al-Baqarah or classical music Mozart Eine Kleine Nachtmisik.K.525: I. Allegro.The software used in this research is Phyton on Google Colab for extraction and Weka machine learning for data classification.

B. Research sample
The population in this study consisted of N = 100 science and technology students, consisting of 4 classes with 25 students in each class.The Slovin formula [24] determines the sample by the with an error limit of e = 20% (small population).So, the minimum number of samples in this study, n = N/(1+N(e) 2 ) = 100/(1+100(0.2) 2 ) = 20.Therefore, in this study, 26 volunteers who were final year adolescents participated, with male and female gender.The research sample was divided into two groups, 13 people who were given Al-Quran murotal stimulation and 13 who received classical music.Informed consent was obtained from each volunteer according to ethical guidelines.Inclusion criteria included 5th or semester 6th-semester students of UIN Walisongo Semarang with an age range between 19-23 years who are Muslim, physically and mentally healthy, and are not under the influence of drugs.Meanwhile, the exclusion criteria included students who had hearing impairments and were married.

C. Research Design
This research was conducted using an experimental method, in which volunteers were measured directly using the EEG in the Integrated Laboratory Faculty of Science and Technology, Universitas Islam Negeri Walisongo Semarang.The placement of the electrodes was arranged according to the national standard for the installation of electrodes 10-20, with the direction of the electrode using the ear reference, as shown in Figure 1.Placement of the electrodes corresponds to the parts of the human cerebrum, namely Frontal (F), Parietal (P), Occipital (O), and Temporal (T).In this study, the data used were only electrodes with several frontal positions, namely Fp1-A1, Fp2-A2, F3-A1, F4-A2, F7-A1, and F8-A2.Because frontal lobe function is associated with performance involving cognitive control functions such as suppressing habitual responses, maintaining attention, and managing distractions [25].Data was collected by placing electrodes on the subject's scalp according to the 10-20 system in a quiet laboratory room.Subjects were in a comfortable and relaxed sitting position in the measuring cabin's shielded chair.Subjects were asked to close their eyes.Furthermore, recording of brain signals using EEG.The recording procedure was performed for 6 minutes with the following protocol: 3 minutes without stimulation and 3 minutes with stimulation.Furthermore, the data used to be processed is data for 1 minute in stimulation condition.Brain signal data is stored as an edf file, then separated using the edf browser to get brain signals for one minute.

D. Research Procedure
The research procedure is presented in Figure 2. Before taking measurements using EEG, the population was filtered based on inclusion criteria, resulting in a sample of 26 people divided into 2 groups.Next, the sample's brain waves were measured using EEG with murottal Al-Quran stimulation and classical music with a procedure of 3 minutes in a quiet and 3 minutes in a stimulated condition.Brain signal data is extracted in EDF form, then processed using brain wave data for 1 minute, selected based on the best signal (with no/little noise and artifacts) separated using the EDF browser.Data processing uses Python on Google Colab in the form of filters and data extraction.In the final stage, the extracted data is classified using the random Forest method with Weka Machine Learning software and then analyzed.

E. Data processing
Flowchart data processing is shown in Figure 3.This stage consists of preprocessing and processing data.The first stage, preprocessing consists of filtering raw and extraction data using Python on Google Colab.Raw EDF data is filtered using the Independent Component Analysis (ICA) algorithm and Bandpass filter.Data was extracted using the Power Spectral Density (PSD) algorithm to convert data in the time domain to the frequency domain.The second stage, data processing consists of data labeling using MS Excel, followed by data classification using the random forest method in Weka Machine Learning.This classification consists of training and testing sets.The training set functions to measure the ability of the random forest method to classify data.The testing set uses a cross-validation technique with k-folds consisting of 5, 10, 15, 20, and 25.The testing set functions to test the ability of this random forest method to classify data.The description of data processing is explained as follows.
• Preprocessing data ICA aims to decompose measured signals, or variables, into a set of basic variables applied in two research fields relevant to cognitive science: biomedical data analysis and computational modeling.One of the earliest biomedical applications of ICA involved EEG data analysis, with ICA being used to recover signals associated with visual target detection.ICA has been used to recover the Temporal Independent Component (TIC) associated with visual target detection.In this case, each electrode output is a temporal mixture.The signal recorded at each electrode is a mixture of TICs, and temporal ICA (tICA) is used to recover estimates of these temporally independent components [26].
Band-Pass Filter, often abbreviated as BPF, is a filter or frequency filter that passes frequency signals in a certain frequency range, namely passing signals between the lower limit frequency and the upper limit frequency.In other words, this band pass filter will reject or attenuate frequency signals outside the specified range [27].
Power Spectral Density (PSD) is the most widely used orthogonal signal decomposition due to its computational efficiency and ease of interpretation.It is implicitly assumed that the signal is stationary; however, PSD is often used with transient events with long duration relative to the spectral content.Transients are changes in the value of voltage or current or both, either momentarily or within a certain period (on the order of microseconds) from steady-state conditions.The weighting window function is required for a limited number of samples that would cause leakage and cause distortion of the spectral components and also has limited frequency resolution.However, this approach is the most widely used industrial tool for vibration analysis in rotating machines [28].

• Processing data
Random forest is a supervised learning algorithm.The "forest" it constructs is an ensemble of decision trees, usually trained using the "pocket" method.The general idea of the bagging method is that a combination of learning models improves the overall result.For a random forest consisting of  trees is formulated as in (1) [29].where  is the indicator function, and ℎ  is tree to-n in a random forest.
The random forest algorithm has three main parameters, which must be set before training.This includes node size, number of trees, and number of sampled features.From there, random forest classifiers can solve regression or classification problems [30].The random forest algorithm consists of a collection of decision trees, and each tree in the ensemble consists of a sample of data taken from the training set with a replacement called a bootstrap sample.Among training samples used in the study, one-third was set aside as test data, known as an out-of-bag (OOB) sample.Another instance of randomness is then injected via feature bagging, adding more diversity to the dataset and reducing the correlation between decision trees.Depending on the type of problem, predictions will vary.The individual decision trees will be averaged for the regression task, and for the classification task, the majority vote-i.e.. the most frequent categorical variable-will result in the predicted class.Finally, the OOB sample is used for cross-validation, completing the prediction [30].Random forest method coding is included in Weka Machine Learning as in Pseudocode 1 [31].

F. Data Analysis
The confusion matrix is used when solving classification problems.The confusion matrix can be applied to binary classification as well as to multiclass classification problems.Accuracy is low when used with unbalanced data sets; therefore, another matrix based on the confusion matrix can be useful for evaluating performance.Precision and recall are widely used for classification.Precision indicates how accurately the model predicts positive values.This is known as the positive predictive value.Recall is useful for measuring a model's power to predict a positive outcome and is also known as model sensitivity.Both measures provide valuable information, but the aim is to increase recall without affecting precision.Precision and recall values can be calculated in Python.The formula for calculating accuracy, precision, and recall is given as in (2) to (4) [32].
where  is the number of positive data and predicted correctly,  is the number of negative data predicted correctly,  is the number of negative data but predicted positively, and  is the number of positive data but predicted negative.

III. Result and Discussion
The result, after being filtered using Independent Component Analysis (ICA), managed to reduce artifacts and noise; there are no more signals that intersect between channels.Brain signals less than 0.5 Hz (low-pass filter) and signals exceeding 35 Hz (high-pass filter) will be attenuated automatically using band-pass filter.
The data generated in the extraction process is in the form of percentages for each type of wave; it is delta, theta, alpha, and beta.Figure 4 shows the extraction results in percent using the PSD algorithm for respondents who provided the stimulus of murottal Al-Quran and classical music.Data in the time domain has been converted into the frequency domain presented in percentages.The extraction results show that the frequency percentages from highest to lowest are delta, alpha, theta, and beta, respectively.However, the delta and alpha data show an interrelated pattern, the delta and alpha wave lines crossing each other.Figure 4 compares of the average percentage of respondents' brain wave frequencies when given murottal Al-Quaran stimulation and classical music.In the data extraction process obtained in the samples given the murottal Al-Quran stimulus, the average data of brain wave activity was dominated by delta waves at 45.32%, followed by alpha waves at 31.50%, theta at 17.02%, and beta at 6.05%.These results are reciprocal with previous research by Abdurrochman et al. [18], which shows that the Auditory Evoked Potential (AEP) notes on murottal Al-Quran are dominated by deltas so they can be used as a therapy for sleep disorders.Besides that, it is in accordance with research conducted by Norsiah and Amira [16] and Abdullah and Omar [19] that listening to the recitation of Murottal Al-Qur'an can help a person to always be relaxed.This relaxed condition occurs when brain waves with a frequency of 0.5-7 Hz (delta and theta).Relaxed states predominate during deep sleep, coma, and anesthesia due to very low frequency (delta activity).Theta rhythms are usually observed in drowsiness and a state of low alertness.A specific type of theta, referred to as "frontal midline theta" can be observed during various tasks such as mental computation, working memory, error processing, and meditation [33].
Based on Figure 4, the data extraction process was obtained in samples given classical music stimulus.The average data of brain wave activity was dominated by delta waves at 46.65%, followed by alpha waves at 28.64%, theta at 19.21%, and beta at 5.50%.Previous research by Maity et al. [34] to investigate the response of the frontal brain when given musical stimulation (simple acoustic) produced a complex increase in alpha and theta waves using multifractal spectral width.This research shows different results due to the different types of music used, namely simple acoustics using the Empirical Mode Decomposition (EMD) data processing algorithm.This can cause differences in respondents' brain responses and different data processing can produce different results.
Figure 5 shows that delta and theta wave activity is greater when given classical music than the murottal Al-Quran stimulus.Meanwhile, theta and beta wave activity were greater when given a murottal Al-Quran than classical music, when given a stimulus to listen to classical music, the activity of alpha and beta waves is greater when compared to when listening to murottal Al-Quran.This increase in alpha wave activity is by research conducted by Abdurrochman et al. [18] and Abdullah and Omar [19] that listening to classical music or relaxing music can generate alpha waves and improve cognitive abilities.The alpha rhythm is usually dominant in the rest-awake state, both relaxed and comfortable.Beta rhythms are usually associated with cortical integrity, increased alertness, and cognitive processing [35].Beta waves occur mainly during waking, and increased beta strength can be caused by stress, strong emotions, and tension [33].The two sound stimuli given were in the form of murottal Al-Quran and classical music, both of which had dominant delta brain waves, this could mean that the sample was sleepy and some even fell asleep.This is because the electrode installation process takes quite a long time [33].Data classification using the random forest method in Weka machine learning.The data is trained using the Training Set tool, until an accuracy of 100% is obtained, meaning the data can be grouped well.Next, it was tested using cross-validation techniques.This involves ordering a specific sample from a data set on which the model is not trained.The larger the K-folds, the smaller the resampling subsets.The number of k-folds also determines how often the Machine Learning Model is trained [36].
This study tested folds starting from 5, 10, 15, 20, and 25 shown in Table 1.Good results on folds k = 5, namely experiments with 5 stages.The value of folds k = 5 is the middle value.This is equal to the research conducted by Furqon et al. [37], who used the Modified K-Nearest Neighbor (MKNN) and tested it with folds k = 1 to k = 10.The best result lies in k = 7.This differs from previous research conducted by Tapikap et al. [38], which used the Transformed Complement Naïve Bayes (TCNB) method with a 2,3,4,5,6,7,8,9,10 test.The highest accuracy results are at 10 folds.The difference between previous research and this research is due to the difference in the classification method used.This research is the value of True Positive (TP), which is a murottal Al-Quran that is detected as murottal Al-Quran 8, True Negative (TN) is murottal Al-Quran which is detected as classical music 9, False Positive (FP) is classical music which is detected as murottal Al-Quran was 4, and False Negative (FN) for murottal Al-Quran detected as classical music was 5.The TN and FN values were quite large.This could be due to the non-homogeneous sample conditions in the research conducted by ul-Ain Irfan et al. [39] listening to murottal Al-Quran and classical music, both of which have a positive effect on reducing blood pressure and anxiety levels of patients.
The accuracy value obtained in this study was 65.38%.Compared to previous research by Rahman et al. [20], identifying the relationship between musical stimulus and brain waves and analyzing the effects of 3 different musical genres based on KNN, SVM, and NN.The results show that NN and the Genetic Algorithm (GA) feature selection can achieve the highest accuracy of 97.5% in classifying 3 music genres.The results of this study used the random forest method to classify waves based on unfavorable frequencies.Low accuracy can be caused by data imbalance so that the classifier cannot predict the data correctly [40].Some of the findings in this research include that adolescent brain signals have the same frequency pattern from highest to lowest, namely delta, alpha, theta, and beta.It shows that these two stimulations make teenagers more relaxed and reduce concentration.Meanwhile, alpha and beta brain waves were higher when stimulated by murottal Al-Quran, while delta and theta were higher when stimulated by classical music.It shows that Al-Quran stimulation predominantly increases relaxation and concentration, while music stimulation can predominantly increase relaxation and short-term memory.The data classification results using random forest with k-fold 5 show that the accuracy obtained is 65.38%, meaning that when stimulated using murottal Al-Quran and classical music, adolescent brain waves are difficult to differentiate.It is due to the similarities in adolescent brain patterns when both types of stimulation are heard.It differs from the classification for distinguishing a person's emotional condition and cognitive [41] [42].
The results of this study show that stimulation using murottal al-Quran and classical music effectively improves adolescent relaxation conditions.Murottal al-Quran can improve concentration, while classical music can improve short-term memory.It can be used in the world of health for therapy in adolescents who experience anxiety disorders, increasing concentration in learning and improving short-term memory.However, this research is limited to manual data processing and uses several different types of software.In future research, data processing can be done automatically using a Graphical User Interface (GUI), making it easier for health workers.

IV. Conclusions
Research has been carried out to determine the response of adolescents when given murottal Al-Quran stimulation and extraction-based classical music using the PSD method.The research results showed the same results between the two types of stimulation, namely the order of brain waves from highest to lowest were delta, alpha, theta and beta.The average brain waves of teenagers when given murottal al-Quran stimulation were 45.32% delta, 31.60%alpha, 17.02 theta and 6.05% beta.Meanwhile, the average brain waves of teenagers when given classical music stimulation were 46.54% delta, 28.64% alpha, 19.21% theta and 5.50% beta.Classification is obtained with the best value that frequently appears (mode) from the prediction results for each sample using random forest methods.The accuracy, precision, and recall of classifying adolescent brain waves when given murottal and classical music stimuli using the Random Forest method with cross-validation technique (optimum at k-fold=5) were 65.38%, 76.92%, and 70.00%, respectively.The results of this study show that stimulation using murottal al-Quran and classical music effectively improves adolescent relaxation conditions.Murottal al-Quran can improve concentration, while classical music can improve shortterm memory.It can be used in the world of health for therapy in adolescents who experience anxiety disorders, increasing concentration in learning and improving short-term memory.However, this research is limited to manual data processing and uses several different types of software.In future research, data processing can be done automatically using a GUI, making it easier for health workers.

Fig. 4 .
Fig. 4. Percentage of waves in the sample given the stimulus of listening to (a) murottal Al-Quran (b) classical music.

Fig. 5 .
Fig. 5.The average brain wave activity when given a murottal Al-Quran stimulus and classical music