Knowledge Engineering and Data Science (KEDS) pISSN 2597-4602 Vol 6, No 2, October 2023, pp. 157–169 eISSN 2597-4637 https://doi.org/10.17977/um018v6i22023p157-169 ©2023 Knowledge Engineering and Data Science | W : http://journal2.um.ac.id/index.php/keds | E : keds.journal@um.ac.id This is an open access article under the CC BY-SA license (https://creativecommons.org/licenses/by-sa/4.0/) EEG Classification while Listening to Murottal Al-Quran and Classical Music using Random Forest Method Heni Sumarti a,1, Fahira Septiani a,2, Agus Sudarmanto a,3, Wahyu Caesarendra b,4, Rizki Edmi Edison c,,d,e,5,* a Department of Physics, Faculty of Science and Technology, Universitas Islam Negeri Walisongo Semarang Jl. Prof. Dr. Hamka No.3-5, Semarang 50185, Indonesia b Faculty of Integrated Technologies, Universiti Brunei Darussalam Jalan Tungku Link BE1410, Brunei Darussalam c Neuroscience Institute, Universitas Prima Indonesia Jl. Sampul No. 3, Medan 20118, Indonesia dInstitute of Leadership, Innovation, and Advancement, Universiti Brunei Darussalam Jalan Tungku Link BE1410, Brunei Darussalam e Research Center of Public Policy, National Research and Innovation Agency Jl. M.H. Thamrin No.8, Jakarta Pusat 10340, Indonesia 1heni_sumarti@walisongo.ac.id; 2fahira.septiani.fs@gmail.com; 3agussudarmanto@walisongo.ac.id; 4wahyu.caesarendra@ubd.edu.bn; 5rizkiedmiedison@unprimdn.ac.id* * corresponding author 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 ARTICLE INFO A B S T R A C T Article history: Received 06 October 2023 Revised 13 October 2023 Accepted 18 October 2023 Published online 19 October 2023 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. This is an open access article under the CC BY-SA license (https://creativecommons.org/licenses/by-sa/4.0/). Keywords: Classification brain wave Murottal Al-Quran Classical music Random Forest http://u.lipi.go.id/1502081730 http://u.lipi.go.id/1502081046 http://journal2.um.ac.id/index.php/keds mailto:keds.journal@um.ac.id https://creativecommons.org/licenses/by-sa/4.0/ mailto:rizkiedmiedison@unprimdn.ac.id https://creativecommons.org/licenses/by-sa/4.0/ H. Sumarti et al. / Knowledge Engineering and Data Science 2023, 6 (2): 157–169 158 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 non- invasive 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 159 H. Sumarti et al. / Knowledge Engineering and Data Science 2023, 6 (2): 157–169 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. II. Methods 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 H. Sumarti et al. / Knowledge Engineering and Data Science 2023, 6 (2): 157–169 160 control functions such as suppressing habitual responses, maintaining attention, and managing distractions [25]. (a) (b) Fig. 1. Placement of elektrode with (a) 10-20 system and (b) direction elektrode using ear reference 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 161 H. Sumarti et al. / Knowledge Engineering and Data Science 2023, 6 (2): 157–169 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]. Fig. 2. Research procedure H. Sumarti et al. / Knowledge Engineering and Data Science 2023, 6 (2): 157–169 162 Fig. 3. Flowchart data processing • 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]. Processing Data Labeled Data Training set Testing set Classification Random Forest Data filtration Independent Component Analysis (ICA) and Bandpass Acquisition data (EEG – Contex KT88) Preprocessing Data Data Extraction Power Spectral Density (PSD) Raw Data (EDF) Start Unlabeled Data Classify End 163 H. Sumarti et al. / Knowledge Engineering and Data Science 2023, 6 (2): 157–169 𝑙(𝑦) = 𝑎𝑟𝑔𝑚𝑎𝑥𝑐(∑ 𝐼ℎ𝑛(𝑦)=𝑐) 𝑁 𝑛=1 (1) 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]. PSEUDOCODE 1. Random Forest Method 1. Initialize matrix p - For j = 1 to 10: - For k = 1 to 1000: - p[j, k] = 0.2 * random + 0.01 - End For - End For 2. Modify matrix p - For j = 1 to 10: - For i = 1 to nint(400 * random): - k = nint(1000 * random) - p[j, k] = p[j, k] + 0.4 * random - End For - End For 3. Initialize matrix x and array y - For n = 1 to N: - j = nint(10 * random) - For m = 1 to 1000: - If random < p[j, m] then - x[m, n] = 1 - Else: - x[m, n] = 0 - End If - y[n] = j - End For 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]. 𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦 = 𝑇𝑃 + 𝑇𝑁 𝑇𝑃 + 𝐹𝑃 + 𝐹𝑁 + 𝑇𝑁 𝑥100% (2) 𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = 𝑇𝑃 𝑇𝑃 + 𝐹𝑁 𝑥100% (3) 𝑅𝑒𝑐𝑎𝑙𝑙 = 𝑇𝑁 𝑇𝑁 + 𝐹𝑃 𝑥100% (4) H. Sumarti et al. / Knowledge Engineering and Data Science 2023, 6 (2): 157–169 164 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. (a) (b) Fig. 4. Percentage of waves in the sample given the stimulus of listening to (a) murottal Al-Quran (b) classical music. 0 10 20 30 40 50 60 70 80 0 2 4 6 8 10 12 14 B ra in W a v e ( % ) Subject Delta Theta Alpha Beta 0 10 20 30 40 50 60 70 80 0 2 4 6 8 10 12 14 B ra in W a v e ( % ) Subject Delta Theta Alpha Beta 165 H. Sumarti et al. / Knowledge Engineering and Data Science 2023, 6 (2): 157–169 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]. Fig. 5. The average brain wave activity when given a murottal Al-Quran stimulus and classical music 45.32 17.02 31.60 6.05 46.65 19.21 28.64 5.50 0 10 20 30 40 50 60 Delta Theta Alpha Beta B ra in W a v e ( % ) Murottal Classical Music H. Sumarti et al. / Knowledge Engineering and Data Science 2023, 6 (2): 157–169 166 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. Table 1. Confusion Matrix No. Folds TP (data) FP (data) FN (data) TN (data) Accuracy (%) Precision (%) Recall (%) 1 Training 13 0 13 0 100.00 100.00 100.00 2 5 10 3 6 7 65.38 76.92 70.00 3 10 8 5 6 7 57.69 61.54 58.33 4 15 9 4 7 6 57.69 69.23 60.00 5 20 7 6 6 7 53.85 53.85 53.85 6 25 8 5 7 6 53.85 61.54 54.55 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 167 H. Sumarti et al. / Knowledge Engineering and Data Science 2023, 6 (2): 157–169 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 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 GUI, making it easier for health workers. Acknowledgment We thank LST (Labolatorium Saintek Terpadu) for the EEG instrumentation that has been provided. Declarations Author contribution All authors contributed equally as the main contributor of this paper. All authors read and approved the final paper. Funding statement This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors. Conflict of interest The authors declare no known conflict of financial interest or personal relationships that could have appeared to influence the work reported in this paper. Additional information Reprints and permission information are available at http://journal2.um.ac.id/index.php/keds. Publisher’s Note: Department of Electrical Engineering and Informatics - Universitas Negeri Malang remains neutral with regard to jurisdictional claims and institutional affiliations. References [1] H. Sumarti, T. Nurmar’atin, H. H. Kusuma, I. Istikomah, and I. S. Prastyo, “Development of Chobmons Prototype: Cholesterol and Blood Sugar Level Monitoring System Based on Internet of Things (IoT) using Blynk Application,” J. Fis. dan Apl., vol. 18, no. 3, p. 53, Sep. 2022. [2] B. Larsen and B. Luna, “Adolescence as a neurobiological critical period for the development of higher-order cognition,” Neuroscience and Biobehavioral Reviews, vol. 94. pp. 179–195, 2018. [3] P. L. Nunez and R. Srinivasan, “A theoretical basis for standing and traveling brain waves measured with human EEG with implications for an integrated consciousness,” Clinical Neurophysiology, vol. 117, no. 11. pp. 2424–2435, 2006. [4] A. Al Bataineh and A. Jarrah, “High Performance Implementation of Neural Networks Learning Using Swarm Optimization Algorithms for EEG Classification Based on Brain Wave Data,” vol. 13, no. 1, pp. 1–17, 2019. [5] M. E. McCullough and E. C. Carter, “Religion, self-control, and self-regulation: How and why are they related?,” APA handbook of psychology, religion, and spirituality (Vol 1): Context, theory, and research. pp. 123–138, 2013. http://journal2.um.ac.id/index.php/keds https://doi.org/10.12962/j24604682.v18i3.12532 https://doi.org/10.12962/j24604682.v18i3.12532 https://doi.org/10.12962/j24604682.v18i3.12532 https://doi.org/10.1016/j.neubiorev.2018.09.005. https://doi.org/10.1016/j.neubiorev.2018.09.005. https://doi.org/10.1016/j.clinph.2006.06.754 https://doi.org/10.1016/j.clinph.2006.06.754 https://doi.org/10.4018/IJAMC.292500 https://doi.org/10.4018/IJAMC.292500 https://doi.org/10.1037/14045-006 https://doi.org/10.1037/14045-006 H. Sumarti et al. / Knowledge Engineering and Data Science 2023, 6 (2): 157–169 168 [6] G. Olivo, S. Gaudio, and H. B. Schiöth, “Brain and cognitive development in adolescents with anorexia nervosa: A systematic review of FMRI studies,” Nutrients, vol. 11, no. 8, 2019. [7] P. Prini et al., “Adolescent THC exposure in female rats leads to cognitive deficits through a mechanism involving chromatin modifications in the prefrontal cortex,” J. Psychiatry Neurosci., vol. 43, no. 2, pp. 87–101, 2018. [8] P. Muris, H. Otgaar, C. Meesters, A. Heutz, and M. van den Hombergh, “Self-compassion and Adolescents’ Positive and Negative Cognitive Reactions to Daily Life Problems,” J. Child Fam. Stud., vol. 28, no. 5, pp. 1433–1444, 2019. [9] L. Colzato and C. Beste, “A literature review on the neurophysiological underpinnings and cognitive effects of transcutaneous vagus nerve stimulation: Challenges and future directions,” J. Neurophysiol., vol. 123, no. 5, pp. 1739 – 1755, 2020. [10] T. Stegemann, M. Geretsegger, E. Phan Quoc, H. Riedl, and M. Smetana, “Music Therapy and Other Music-Based Interventions in Pediatric Health Care: An Overview,” Medicines, vol. 6, no. 1, p. 25, 2019. [11] M. Vaezi, N. Shafiee, and A. H. Mehdizadeh, “The effectiveness of fusion music on anxiety and aggression in adolescent,” pp. 78–82, 2021. [12] D. E. Osmanoğlu and H. Yilmaz, “The Effect of Classical Music on Anxiety and Well-Being of University Students,” Int. Educ. Stud., vol. 12, no. 11, p. 18, 2019. [13] D. Oktarosada, M. Masrur, E. Yunitasari, and H. Mukhlis, “The Effect of Murottal Al-Quran on Anxiety Levels Toward IX Class Students in Facing Examination at The Junior High School of Muhammadiyah 1 Kalirejo Central Lampung,” J. Aisyah J. Ilmu Kesehat., vol. 7, no. S1, pp. 113–116, 2022. [14] S. Sumarni, S. D. H. Atifah, T. Ta’adi, and E. R. Ambarwati, “Does Yoga-Murottal Reduce Dysmenorrhea Pain and Improve Beta-Endorphin Hormone Levels in Adolescents?,” Open Access Maced. J. Med. Sci., vol. 10, no. T8, pp. 54–57, 2022. [15] M. E. Y. Fujianti, H. Kristianto, and L. Yuliatun, “Combination of Music Therapy and Murottal Therapy on Pain Level of Breast Cancer Patients,” J. Aisyah J. Ilmu Kesehat., vol. 8, no. 1, pp. 405–414, 2023. [16] F. Norsiah and A. Nurul Amira, “The effects of neurotherapy (NFT) using ayatul kursi as stimulus on memory performance,” J. Islam. Soc. Econ. Dev., vol. 2, no. 4, pp. 22–31, 2017. [17] A. Majid.S, “Islamic Post Brain Research: Quranic Memorization Key to Muslim Scientific,” 2013. [18] R. A. Abdurrochman, “The Comparison of Classical Music, Relaxation Music and. The 2007 Regional Symposium on Biophysics and Medical Physic,” 2007. [19] A. A. Abdullah and Z. Omar, “The Effect of Temporal EEG Signals While Listening to Quran Recitation,” Int. J. Adv. Sci. Eng. Inf. Technol., vol. 1, no. 4, p. 372, 2011. [20] J. S. Rahman, T. Gedeon, S. Caldwell, and R. Jones, “Brain Melody Informatics: Analysing Effects of Music on Brainwave Patterns,” in 2020 International Joint Conference on Neural Networks (IJCNN), Jul. 2020, pp. 1–8. [21] H. Sumarti, S. R. Anggita, F. R. Pratama, and A. N. Tasyakuranti, “Texture-Based Classification of Benign and Malignant Mammography Images using Weka Machine Learning : An Optimal Approach,” Evergr. J., vol. 10, no. 03, 2023. [22] I. Winkler, S. Debener, K. R. Muller, and M. Tangermann, “On the influence of high-pass filtering on ICA-based artifact reduction in EEG-ERP,” Proc. Annu. Int. Conf. IEEE Eng. Med. Biol. Soc. EMBS, vol. 2015-Novem, pp. 4101–4105, 2015. [23] G. Y. Orhan, “4 Reasons Why You Should Use Google Colab for Your Next Project,” Towar. Data Sci., pp. 1–9, 2020. [24] J. J. Tejada, J. Raymond, and B. Punzalan, “On the Misuse of Slovin’s Formula,” Philipp. Stat., vol. 61, no. 1, p. 8, 2012. [25] M. Andersson, M. Ystad, A. Lundervold, and A. J. Lundervold, “Correlations between measures of executive attention and cortical thickness of left posterior middle frontal gyrus - a dichotic listening study,” Behav. Brain Funct., vol. 5, no. 1, p. 41, 2009. [26] E. Palmer, “Africa: An Introduction,” Africa An Introd., vol. 6, no. 2, pp. 1–308, 2021. [27] D. Kho, “Pengertian Band Pass Filter (BPF) atau Tapis Lolos Antara,” 2021. [28] G. Louppe, “Understanding Random Forests: From Theory to Practice,” arXiv, no. July, 2014. [29] C. Ferreira Lemos Lima, F. M. Assis, and C. P. de Souza, “A comparative study of use of Shannon, Rényi and Tsallis entropy for attribute selecting in network intrusion detection,” in 2011 IEEE International Workshop on Measurements and Networking Proceedings (M&N), Oct. 2011, pp. 77–82, [30] M. Onesmus, “Introduction to Random Forest in Machine Learning,” Section.Io, pp. 1–17, 2020. [31] Z. Jin, J. Shang, Q. Zhu, C. Ling, W. Xie, and B. Qiang, “RFRSF: Employee Turnover Prediction Based on Random Forests and Survival Analysis,” Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 12343 LNCS, pp. 503–515, 2020. [32] A. Kulkarni, D. Chong, and F. A. Batarseh, Foundations of data imbalance and solutions for a data democracy. Elsevier Inc., 2020. [33] D. Sammler, M. Grigutsch, T. Fritz, and S. Koelsch, “Music and emotion: electrophysiological correlates of the processing of pleasant and unpleasant music.,” Psychophysiology, vol. 44, no. 2, pp. 293–304, Mar. 2007. [34] A. K. Maity et al., “Multifractal Detrended Fluctuation Analysis of alpha and theta EEG rhythms with musical stimuli,” Chaos, Solitons and Fractals, vol. 81. pp. 52–67, 2015. [35] P. L. Nunez and N. Orleans, “A Window on the Mind,” vol. 2, pp. 1–12, 2002. [36] D. Kici, G. Malik, M. Cevik, D. Parikh, and A. Başar, “A BERT-based transfer learning approach to text classification on software requirements specifications,” Proc. Can. Conf. Artif. Intell., pp. 1–13, 2021. [37] M. T. Furqon, Indriati, and A. Hutapea, “Penerapan Algoritma Modified K-Nearest Neighbour Pada Pengklasifikasian Penyakit Kejiwaan Skizofrenia,” J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 2, no. 10, pp. 3957–3961, 2018. [38] H. F. Tapikap, B. S. Djahi, and T. Widiastuti, “Klasifikasi spam e-mail menggunakan metode transformed complement naïve bayes (TCNB) klasifikasi spam e-mail menggunakan metode transformed complement naïve bayes (TCNB),” J-ICON (Jurnal Komput. Inform., vol. 7, no. 1, pp. 21–26, 2019. https://doi.org/10.3390/nu11081907 https://doi.org/10.3390/nu11081907 https://doi.org/10.1503/jpn.170082 https://doi.org/10.1503/jpn.170082 https://doi.org/10.1007/s10826-019-01353-4 https://doi.org/10.1007/s10826-019-01353-4 https://doi.org/10.1152/jn.00057.2020 https://doi.org/10.1152/jn.00057.2020 https://doi.org/10.1152/jn.00057.2020 https://doi.org/10.3390/medicines6010025 https://doi.org/10.3390/medicines6010025 https://japer.in/storage/models/article/sxd7GPk93bjcclxZdSrAR0C1gKNMrxcCd3QftWOKKnmwMWVfcTD2vVoIzUm3/the-effectiveness-of-fusion-music-on-anxiety-and-aggression-in-adolescent.pdf https://japer.in/storage/models/article/sxd7GPk93bjcclxZdSrAR0C1gKNMrxcCd3QftWOKKnmwMWVfcTD2vVoIzUm3/the-effectiveness-of-fusion-music-on-anxiety-and-aggression-in-adolescent.pdf https://doi.org/10.5539/ies.v12n11p18 https://doi.org/10.5539/ies.v12n11p18 https://doi.org/10.30604/jika.v7is1.1210 https://doi.org/10.30604/jika.v7is1.1210 https://doi.org/10.30604/jika.v7is1.1210 https://doi.org/10.30604/jika.v8i1.1649 https://doi.org/10.30604/jika.v8i1.1649 https://doi.org/10.30604/jika.v8i1.1649 https://doi.org/10.30604/jika.v8i1.1649 https://doi.org/10.30604/jika.v8i1.1649 http://www.jised.com/PDF/JISED-2017-04-06-03.pdf http://www.jised.com/PDF/JISED-2017-04-06-03.pdf https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=Islamic+Post+Brain+Research%3A+Quranic+Memorization+Key+to+Muslim+Scientific&btnG= https://www.academia.edu/download/43739547/The_Comparison_of_Classical_Music_Relaxa20160315-625-yijudk.pdf https://www.academia.edu/download/43739547/The_Comparison_of_Classical_Music_Relaxa20160315-625-yijudk.pdf https://doi.org/10.18517/ijaseit.1.4.77 https://doi.org/10.18517/ijaseit.1.4.77 https://doi.org/10.1109/IJCNN48605.2020.9207392 https://doi.org/10.1109/IJCNN48605.2020.9207392 https://catalog.lib.kyushu-u.ac.jp/opac_detail_md/?lang=0&amode=MD100000&bibid=7151705 https://catalog.lib.kyushu-u.ac.jp/opac_detail_md/?lang=0&amode=MD100000&bibid=7151705 https://catalog.lib.kyushu-u.ac.jp/opac_detail_md/?lang=0&amode=MD100000&bibid=7151705 https://doi.org/10.1109/EMBC.2015.7319296 https://doi.org/10.1109/EMBC.2015.7319296 https://doi.org/10.1109/EMBC.2015.7319296 https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=4+Reasons+Why+You+Should+Use+Google+Colab+for+Your+Next+Project&btnG= https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=4+Reasons+Why+You+Should+Use+Google+Colab+for+Your+Next+Project&btnG= https://www.psai.ph/docs/publications/tps/tps_2012_61_1_9.pdf https://www.psai.ph/docs/publications/tps/tps_2012_61_1_9.pdf https://doi.org/10.1186/1744-9081-5-41 https://doi.org/10.1186/1744-9081-5-41 https://doi.org/10.1186/1744-9081-5-41 https://doi.org/10.4324/9781003111733 http://www.teknikelektronika.com/ http://arxiv.org/abs/1407.7502 https://doi.org/10.1109/IWMN.2011.6088496 https://doi.org/10.1109/IWMN.2011.6088496 https://doi.org/10.1109/IWMN.2011.6088496 https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=Introduction+to+Random+Forest+in+Machine+Learning&btnG= https://doi.org/10.1007/978-3-030-62008-0_35 https://doi.org/10.1007/978-3-030-62008-0_35 https://doi.org/10.1007/978-3-030-62008-0_35 https://www.sciencedirect.com/science/article/pii/B9780128183663000058 https://www.sciencedirect.com/science/article/pii/B9780128183663000058 https://doi.org/10.1111/j.1469-8986.2007.00497.x https://doi.org/10.1111/j.1469-8986.2007.00497.x https://doi.org/10.1016/j.chaos.2015.08.016 https://doi.org/10.1016/j.chaos.2015.08.016 https://doi.org/10.4249/scholarpedia.1348revision https://assets.pubpub.org/rrc10aja/31621568150182.pdf https://assets.pubpub.org/rrc10aja/31621568150182.pdf http://j-ptiik.ub.ac.id/index.php/j-ptiik/article/view/2800 http://j-ptiik.ub.ac.id/index.php/j-ptiik/article/view/2800 https://ejurnal.undana.ac.id/jicon/article/view/878 https://ejurnal.undana.ac.id/jicon/article/view/878 https://ejurnal.undana.ac.id/jicon/article/view/878 169 H. Sumarti et al. / Knowledge Engineering and Data Science 2023, 6 (2): 157–169 [39] N. ul-Ain Irfan, H. Atique, A. Taufiq, and A. Irfan, “Differences in Brain Waves and Blood Pressure by Listening to Quran-e-Kareem and Music,” J. Islam. Med. Dent. Coll., vol. 8, no. 1, pp. 40–44, 2019. [40] K. Hastuti, “Analisis Komparasi Algoritma Klasifikasi Data Mining Untuk Prediksi Mahasiswa Non Aktif,” Semin. Nas. Teknol. Inf. Komun. Terap. 2012, vol. 14, no. 1, pp. 241–249, 2012. [41] A. Azhari, A. Susanto, A. Pranolo, and Y. Mao, “Neural Network Classification of Brainwave Alpha Signals in Cognitive Activities,” Knowl. Eng. Data Sci., vol. 2, no. 2, p. 47, 2019. [42] A. Y. Saleh and L. K. Xian, “Stress Classification using Deep Learning with 1D Convolutional Neural Networks,” Knowl. Eng. Data Sci., vol. 4, no. 2, p. 145, 2021. https://doi.org/10.35787/jimdc.v8i1.315 https://doi.org/10.35787/jimdc.v8i1.315 http://publikasi.dinus.ac.id/index.php/semantik/article/view/132 http://publikasi.dinus.ac.id/index.php/semantik/article/view/132 https://doi.org/10.17977/um018v2i22019p47-57 https://doi.org/10.17977/um018v2i22019p47-57 https://doi.org/10.17977/um018v4i22021p145-152 https://doi.org/10.17977/um018v4i22021p145-152