Classification of EEG Signal using Independent Component Analysis and Discrete Wavelet Transform based on Linear Discriminant Analysis

— Autism Spectrum Disorder (ASD) is a neurodevelopment syndrome decreasing sufferers' social interaction, communication skills, and emotional expression. Autism syndrome can be detected using an electroencephalogram (EEG). This study utilized the EEG of autistic people to support the classification study of machine learning schemes to produce the best accuracy. One of the best approaches to classify the EEG signal is The Linear Discriminant Analysis (LDA), a machine learning technique to classify autism and normal EEG signals. LDA was chosen because it can maximize the distance between classes and minimize the number of scatters by utilizing between and within-class functions. This method was combined with other methods: Independent Components Analysis (ICA) and Discrete Wavelet Transform (DWT), to improve the accuracy system. ICA removes artifacts or signals other than brain signals that can cause noise in the EEG signal, so the analyzed signal was a complete EEG signal without other factors. DWT can help increase noise suppression in the EEG signal and provide signal information through frequency and time representation. The EEG dataset was collated from 16 children (eight autistic and eight normal). The signals from the dataset were filtered by artifacts using ICA, decomposed by three levels through DWT, and classified using the Linear Discriminant Analysis (LDA) technique. Using the Confusion Matrix, the results reveal the best accuracy of 99%.


I. INTRODUCTION
Autism Spectrum Disorder (ASD) is a neurodevelopmental syndrome, a disorder in the brain's neurodevelopment, decreasing sufferers' social interaction, communication skills, and emotional expression [1].Symptoms of autism usually begin before three years old and are characterized by difficulty understanding facial expressions, speech delays, repetitive behaviour patterns, and poor comprehension skills [2].Global statistics show an estimated 62 per 10,000 people worldwide are affected by autistic syndrome [3].This does not rule out that the emergence of the autistic syndrome will often occur.
ASD detection can be done using technology like Electroencephalogram (EEG) [4].EEG results from recording brain activity in the form of electrical signals obtained through a Brain-Computer Interface (BCI).BCI is a device detecting electric potential through electrodes attached to the scalp.However, recording the EEG signal results is complex [5].So we need the help of artificial intelligence technology with machine learning schemes to analyze signal patterns.The development of research related to EEG with ASD syndrome is rare due to limitations and difficulties in obtaining data.For this reason, this study observation used the EEG of people with autism to support classification studies with machine learning schemes on ASD syndrome.
Linear Discriminant Analysis (LDA) is a dimensionreduction technique used in statistics, pattern recognition, and machine learning to separate data into several classes [6].LDA was chosen because it can maximize the distance between classes and minimize the number of scatters by utilizing the between and within-class functions [7].Several studies related to LDA showed the best accuracy above 80% (86% and 90%) [38] [8].In this study, LDA was combined with Independent Component Analysis (ICA) and Discrete Wavelet Transform (DWT) methods to eliminate artifacts and suppress noise to improve system accuracy [9].
ICA removes artifacts or signals other than brain signals that can cause noise in the EEG signal so that the analyzed signal is a complete EEG signal without other factors [12].Meanwhile, DWT extraction is a digital signal processing technique that filters and extracts signal to certain frequencies through low and high-pass filter processes [10].The use of wavelets can help increase noise suppression in the EEG signal [11].DWT can provide signal information through the representation of frequency and time.This research is expected to contribute to developing EEG studies for people with autism and support the LDA classification technique by producing the best accuracy values.

II. MATERIAL AND METHOD
This study used the EEG dataset provided by King Abdulaziz University (UKA), Jeddah, Saudi Arabia.The dataset can be accessed through the website: https://malhaddad.kau.edu.sa/Pages-BCI-Datasets-En.aspx, which recorded eight samples of children with autism and eight EEGs of normal children using the BCI2000 Viewer.The proposed framework is demonstrated in Fig. 1.  [12].The working principle of ICA is to distribute a set of signals mixed into a separate set of components to separate the original data and the artifact data components.Research has proven that the ICA method efficiently separates artifacts in signals, such as eye blink, heart rate, or muscle movement [20] [21].In the case of EEG, ICA usually works in the signal pre-processing stage.ICA can eliminate all signals that are not from the brain by separating the signals (un-mixing signals) [12].
ICA can decompose multi-channel recordings into a linear form of different processes or signal sources.ICA data is modeled in a linear form as follows: (1) Equation ( 1) is the general equation of the Independent Component Analysis (ICA) method.Where X is the result of multiplying the matrix A (signal mixed with other signals) with the original signal in the form of component s.The value of X refers to the IC (Independent Component).The recorded data s can be completely reconstructed to eliminate artifacts by multiplying the matrix W by X. Where: (2) To re-project the desired independent component, reconstruct the corrected data using the following algorithm: Fig. 2 ICA Processing Method Fig. 3 DWT Processing Method Fig. 2 illustrates the ICA processing method.The first 16 autistic and normal EEG signals are sampling frequency to limit the signal length and save storage.Next, the sampling process results are carried out by un-mixing and inverse so that the original signal and the resulting mixed signal can be separated without reducing the information on the EEG signal.To minimize the amount of noise, ICA models the signal data into a linear form to separate the mixed signal from the real signal by determining the separation coefficient based on equations ( 1) and ( 2).The inverse matrix value in equation ( 2) is the most important factor used to eliminate all signals not from the brain.ICA filtering is done using Matlab software with the help of EEGLAB.In the data import stage, the type of function used is BCI2000 because the EEG signal recording format has an output of ".dat".Then, to get information from the signal, import event info from each recorded channel is carried out, which is 16 events per data sample.This process results in the length of the data being 15,985 for 16 samples after the cutting process is carried out every 4 seconds.Each subject has 1000 data lengths, resulting in 16 thousand data.However, there are 15 overlapping data,

B. Discrete Wavelet Transform (DWT)
In this research, Discrete Wavelet Transform (DWT) is used to extract or filter signals into certain frequencies through low and high-pass filter processes.Signal extraction is useful for reducing the length and size of the data.The DWT computation is as follows: Fig 3 shows that the results of the ICA processing are decomposed into three levels to obtain complex components with a dominant beta frequency of 16-32 Hz.The detail signal is selected to get accurate information from the signal.Mother Wavelet used is db4.This wavelet type has proven suitable for processing raw EEG signals and produced the best signal filtering [26].Using this wavelet can help increase noise suppression in the signal after being processed with ICA, resulting better signal.The signal that has gone through the pre-processing stage is decomposed through the MATLAB sub-program in the form of a Wavelet Analyzer.The decomposition into three signal levels produces a detailed signal with a frequency of 16-32 Hz, representing the dominant beta signal.Therefore, the analysis used is a signal representing active autistic children.

C. Linear Discriminant Analysis (LDA)
Linear Discriminant Analysis (LDA) is a dimension reduction technique developed by Fisher's Linear Discriminant used in statistics, pattern recognition, and machine learning to separate data into several classes [6].Suppose we have a set of n d-dimensional samples of , , … , which have two different classes: dan with the output can be expressed as a linear combination of components, then the scalar product is: Equation 6 represents the projection of high-dimensional data onto a line.The magnitude of v is not important, but the direction is.This is because the projections of samples belonging to different classes must be well separated, while samples of the same class must be grouped.In other words, the optimal transformation must maximize the scattering ratio between classes to within classes.The scatter matrix within the class is calculated using the following equation: ) " # is a function within the matrix, " and " are matrix variants in classes 1 and 2, respectively.The calculation of S is as follows: While the calculation of the scatter matrix between classes is obtained from the following equation: Where * ! is the number of training samples for each class, µ is the average for class 1, and µ is the total average of all classes obtained from the equation: In the event of two classes, the criterion function for maximizing the scatter ratio between classes and within classes is given by: Furthermore, the eigenvalue and eigenvector are calculated as follows: Where is formed from the 1st column of the optimal transformation matrix V.If " 2 is non-singular, then the above equation can be converted to the conventional eigenvalue: To increase the accuracy of LDA, EEG data requires a 70% training process and 30% testing of 15,985 data.Fig. 4 illustrates a training and testing process on LDA using Python software to test the LDA's performance in classifying data.The input data used is from the DWT extraction.The error rate or the effectiveness of LDA is tested using the Confusion Matrix algorithm.The Confusion Matrix results will be in the form of accuracy, precision, recall, and f1-score.
 Accuracy: the ratio of correct predictions (positive and negative) to the overall data.
 F1 score: represents the comparison of the average weight of fit and recall.If the data set contains a very similar (symmetric) amount of false negative and false positive data, use accurate accuracy to measure the algorithm's performance.However, if the numbers are not close, we recommend using the F1 score as a reference.

III. RESULTS AND DISCUSSION
There are three discussion results of the three methods used (ICA, DWT, and LDA) to classify the EEG of autistic and normal children by producing the best accuracy.

Before ICA Pre-processing
After ICA Pre-processing Fig. 5 EEG signal Before and After ICA Pre-processing Fig. 5 shows the ICA processing result on one normal and autistic EEG sample.The filtering results change the number of channels from 16 to 15.Normal EEG produces 15 channels, including FP1, F3, F7, T3, T5, O1, C4, FP2, FZ, F4, F8, C3, CZ, PZ, and OZ.In contrast, the autistic EEG channels include FP1, F3, F7, T3, T5, O1, C4, FP2, FZ, F4, F8, C3, CZ, PZ, and O2.The system cannot read the O2 channel on the normal EEG and OZ on the autistic EEG because the signal is considered grounding, so the ICA discards it.The MATLAB system only reads all the active nodes on the original signal.
The EEG has a label on each canal indicating the position of the electrode on the scalp.Electrode F stands for Frontal, Fp for Frontopolar, C for Central, O for occipital, and T for Temporal.While the number label owned indicates the lateral location.The electrodes with odd numbers are located in the left hemisphere, while even numbers are located in the right hemisphere.The mixed signal is influenced by external activities during the recording process so that the resulting signal does not come entirely from the brain.This situation is called an artifact.Fig. 5 (c) and (d) are EEG signals for people with autism before and after the ICA filtering process.It can be seen in Fig ( c) that the signal is unstable and undergoes many significant fluctuations.Abnormal EEG produces a more complex form than normal EEG [5], so the ICA method is needed to reduce signal complexity.The signal merging to separate illustrates the difference in both Figs (c) and (d).This is because ICA processing can reduce the frequency by separating the artifacts so that the resulting frequency is the original signal.

B. Discrete Wavelet Transform (DWT) Results
This section describes the application of DWT to autistic and normal EEG signals.The EEG signal from the ICA is divided into a smaller scale frequency, 32-16 Hz, the dominant beta signal.The wavelet type used is DB4.Fig. 6 is the sample of DWT extraction on a normal EEG subject.The extraction results are 15 electrical frequency graphs, ranging from 16 to 32 Hz, including C3, C4, Cz, F3, F4, F7, F8, FP1, FP2, FZ, O1, OZ, PZ, T3, and T5.Fig 6 shows that the signal has a higher or wider frequency range, meaning that the body condition recorded at this node is very active.The highest amplitude indicates the body has high responsiveness.However, if the frequency is small, the activity recorded on the channel is low.The recording process and equipment installation can be affected without good signal quality, so the signal can have a lot of noise and fluctuate.The results of DWT extraction on a normal EEG represent a dominant beta signal indicating that the body is active.The DWT extraction results show that the dominant signal is stable because the resulting frequency is not too high.The same process also applies in Fig. 7, where DWT is conducted to lower the frequency of the EEG signal.Overall, Fig. 6 and 7 show that the extracted autistic EEG signal in each channel produces higher fluctuations than the normal EEG extraction.However, in some cases, such as the F4 channel (see Fig. 6 (E) and 7 (E)), the normal EEG extracted signal is relatively unstable.Channel F4 shows the condition of the physical movement performed by the patient.Therefore, the high fluctuations generated by the signal indicate the subject is doing many physical movements.It causes the F4 channel on a normal EEG to produce a more volatile signal than the other channels [40].At this stage, the output of the DWT is used as input for the LDA classification.The data is visualized using the LDA algorithm, formed through Python software.The data used as input consisted of 16 EEG samples, each consisting of eight autistic samples and eight normal samples.Fig. 8 visualizes the LDA data.

C. Linear Discriminant Analysis (LDA) Results
The classification results are processed using python software coded according to the LDA algorithm.It can be seen that the classification results of the two groups of samples are well separated.LDA separated the two classes by maximizing the distance between classes and reducing the distance between classes.However, some scatters are far from their respective classes due to the non-linear characteristics of the data.
Autistic and normal EEG data each have 16 parameters in the form of channels.LDA will change features from high to lower dimension by utilizing the function between within scatter and mean and maximizing variation on the function between within scatter.Thus, LDA can reduce redundant data and save storage.From the 16 EEG channels, LDA produces one value representing the data.By utilizing information from both data, LDA creates a new axis and, in turn, minimizes the variance and maximizes the class distance of the two variables.
Table I displays the data from the confusion matrix, showing 7897 True Positive (TP), 95 False Positive (FP), 45 False Negative (FN), and 7948 True Negative (TN) data.True Positive means that the correct prediction of the data is 7897.A false Positive is the correct prediction of the data, but it turns out that the data is incorrect (95).False Negative is the prediction of incorrect data that turns out to be true (45).True Negative is the prediction of incorrect data (7948).The results of this confusion matrix produce values of accuracy, precision, recall, and F1-Score, as shown in Fig. 9   According to Fig. 9, the classification accuracy of autistic and normal EEG using the LDA technique is 99% (accurate classification).With only 16 samples, the overall EEG data can prove that LDA has an effective classification system performance.On the other hand, the confusion matrix also produces accurate precision, recall, and f1-score values, where precision according to equation (15) represents the accuracy of the requested data with the results given by the model.Recall depicts the success of the model in finding information according to equation (14).In addition, the f1score is used if the FN and FP values are not close to symmetric, so the f1-score is used as a reference following equation (17).The accuracy represents the quality of a system, calculated according to equation (16).
Table II shows that the precision value, the recall value, and the f1 score of children with autism and normal children are 99%.The overall data shows an accuracy of 99%, indicating an accurate classification result.For benchmarking with other studies related to accuracy classification methods, Tabel III compares the accuracy.It is noticeable that the proposed method using LDA has the highest accuracy (99%).

Fig. 1
Fig. 1 The proposed framework A. Independent Component Analysis (ICA) Independent Component Analysis (ICA) converts raw EEG signals into signals free of artifacts or signals other than brain signals that cause noise in the EEG signal [12].The working principle of ICA is to distribute a set of signals mixed into a separate set of components to separate the original data and the artifact data components.Research has proven that the ICA method efficiently separates artifacts in signals, such as eye blink, heart rate, or muscle movement [20][21].In the case of EEG, ICA usually works in the signal pre-processing stage.ICA can eliminate all signals that are not from the brain by separating the signals (un-mixing signals) [12].ICA can decompose multi-channel recordings into a linear form of different processes or signal sources.ICA data is modeled in a linear form as follows:(1) results are 15,985 data.Finally, the data is exported in the form of a double (number).

Fig. 4 LDA
Fig. 4 LDA System Performance TestingD.Confusion MatrixA confusion Matrix is used to determine the accuracy of the model built to measure the level of classification accuracy.The Confusion Matrix values are Recall, Precision, Accuracy, and F1-Score.Recall (Sensitivity): the ratio of true positive predictions to the total number of correct positive data.345677

Fig. 5 (
a) and (b) show the recording results of brain activities in normal subjects before and after ICA preprocessing.Fig (a) indicates that the signal frequency is higher than after ICA processing.While Fig (b) shows the signal after ICA processing, the signal changes better.ICA pre-processing is needed to produce a cleaner signal, free of noise and artifacts.The resulting electric potential fluctuations also decreased.In its performance, ICA succeeded in eliminating artifacts, reducing the frequency.It can also reduce data storage consumption.The results of the F7 channel recording indicate that the signal becomes smaller and more stable.ICA serves as a separator of the mixed signal from the real signal.

Fig. 7
Fig. 7 Result of DWT extraction of EEG autism in every channel Fig. 7 (f) results from an autistic EEG recording on channel F7.The resulting signal has the largest and widest frequency range, meaning that the signal leads to a gamma frequency, where the patient moves during the EEG measurement or, in other cases, external influences trigger the patient's emotional adrenaline.The difference between the two DWT extraction results is that the normal EEG extraction produces a stable dominant signal because the frequency is not too high.In RESULT OF DWT EXTRACTION OF AUTISM EEG IN EVERY CHANNEL autistic EEG extraction results show a less optimal signal quality because it has a high-frequency range and signal fluctuations.

Fig. 8
Fig.8 illustrates the result of the classification of 16 autistic and normal EEGs after calculating the mean of ICA and DWT extraction results.The ICA and DWT processing produce 15,985 data lengths for 16 EEG samples.To facilitate the data visualization, mean is calculated for each sample channel, resulting in 16 mean values.Therefore, each sample produces a value representing the EEG condition shown in Fig. 8, represented by red and blue dots.The blue color represents the autistic EEG signal, while the red represents the normal EEG signal.The X and Y axes show the mean for each channel.At this stage, the output of the DWT is used as input for the LDA classification.The data is visualized using the LDA algorithm, formed through Python software.The data used as input consisted of 16 EEG samples, each consisting of eight autistic samples and eight normal samples.Fig.8visualizes the LDA data.The classification results are processed using python software coded according to the LDA algorithm.It can be seen that the classification results of the two groups of samples are well separated.LDA separated the two classes by maximizing the distance between classes and reducing the distance between classes.However, some scatters are far from their respective classes due to the non-linear characteristics of the data.Autistic and normal EEG data each have 16 parameters in the form of channels.LDA will change features from high to lower dimension by utilizing the function between within scatter and mean and maximizing variation on the function between within scatter.Thus, LDA can reduce redundant data and save storage.From the 16 EEG channels, LDA produces one value representing the data.By utilizing information from both data, LDA creates a new axis and, in turn, minimizes the variance and maximizes the class distance of the two variables.TableIdisplays the data from the confusion matrix, showing 7897 True Positive (TP), 95 False Positive (FP), 45 False Negative (FN), and 7948 True Negative (TN) data.True Positive means that the correct prediction of the data is 7897.A false Positive is the correct prediction of the data, but it turns out that the data is incorrect (95).False Negative is the prediction of incorrect data that turns out to be true (45).True Negative is the prediction of incorrect data (7948).The results of this confusion matrix produce values of accuracy, precision, recall, and F1-Score, as shown in Fig.9

TABLE I CONFUSION MATRIX
DWT extraction methods have increased the accuracy of autistic and normal EEG signal processing.The ICA method is proven effective in removing artifacts in normal and autistic EEGs by producing a smaller frequency.It can also reduce data storage consumption.The best accuracy of the LDA classification results is 99%, obtained from training and testing results based on the Confusion Matrix processing.