Machine learning (ML), a cornerstone in the field of artificial intelligence (AI), has grown considerably over the past 20 years. ML builds on the principles of statistics and computing and systematically uses algorithms to uncover hidden properties and intrinsic connections in data. Widespread use of ML is observed in many areas (e.g. speech recognition, image pattern recognition, web search, spam filtering, autopilot). In medicine, ML increases the accuracy of prediction and detection of a certain disease as well as the evaluation of prognosis. For biomedical data, ML exposes principled, automated, and objective algorithms for complex and large data. For example, ML shows its advantage in gene selection over the application of classical trait selection.
The goal of ML is to recognize unexplored areas and to make predictions for certain upcoming events. The computational characteristic of ML is to generate a hypothesis through the experience of training (or examples) by algorithmic operations. ML tasks can generally be organized into two main branches: supervised or unsupervised. The first uses pre-tagged entries and aims to converge to the most optimized classifier through a “trained” algorithm to classify unlabeled data. Relative to the supervised method, unsupervised algorithms (for example, clustering and dimensionality reduction algorithms) refer to the process of establishing mathematical models after analyzing the similarities between the unlabeled input variables to detect trends, subgroups, or outliers. To some extent, it produces a significant improvement in learning accuracy.
The electroencephalogram (EEG) machine is a major tool for recording EEG, which plays a fundamental role in the study of epilepsy. EEG contains mainly scalp EEG and intracranial EEG (IEEG) depending on electrode location. EEG of the scalp exhibits oscillations with different frequencies, focusing on the frequency range of 0.5 to 25 Hz in the clinical image. In contrast, IEG carries and analyzes higher frequencies, providing relevant information. EEG is characterized by large spatiotemporal characteristics that cannot be adequately determined by conventional statistical methods. In this context, advanced ML methods can be used to process large-scale EEG signals and synthesize them into samples for classification. Figure 1 shows a portion of the ML phase of the EEG phase.
Fig(1): General steps for EEG treatment. “Feature extraction” refers to the simple data processing to extract hidden information from raw EEG signals from available channels (frequency content or spatial connectivity). The characteristic is divided into univariate characteristics (eg, spectral power) and bivariate characteristics (eg, cross-correlation).
Seizure detection refers to identifying seizures immediately before or after the actual onset. Traditionally, neurology and specialists have used direct visual inspection to identify and classify EEG and above. However, manual labeling of EEG signals is time-consuming and inevitably contains some errors. Research on seizure identification began in the 1970s and there has been considerable effort to achieve this in EEG records. Reliable automatic seizure detection is a problem for several reasons. For example, the EEG pattern of seizures varies considerably from patient to patient, or even in the same patient if the seizures are initiated in other areas of the brain. Since the auto-detection process aims to prevent the onset of seizures, it is important to reduce the detection time, which requires quick and efficient management of the dynamic development of multiple EEG channels. .. Most early studies have shown results in the same lane as high Ogyeongbo rates and waiting times. We believe that eventually AI technology for solving various problems may be compared with the expertise of reading EEG.
Besides seizure detection, epileptic EEG signals and seizure classification can also be resolved by ML. For example, Muthanantha Murugave proposed a new multi-classifier scheme for classifying epileptic EEG signals by combining both hierarchical multilayer SVM frameworks and extreme machine learning (ELM), showing its effectiveness in terms of higher classification accuracy in shorter run time. Acharya et al. used CNN analysis (13 classes) of EEG signals for the first time to achieve high accuracy, specificity, and sensitivity in seizure detection and classification. Jiang et al. Integrated conversion learning, TakagiSugenoKang (TSK) fuzzy system, and semi-supervised learning for exceptional seizure classification performance. Two new developments in their research include 1) transfer learning, which is used to reduce the mismatch in the data distribution between the training and test data; 2) Semi-supervised learning leverages unlabeled test data. Sairamya et al. found a local neighbor gradient model and asymmetrically weighted local neighbor gradient model achieving higher classification accuracy using an artificial neural network (ANN) for temporal epileptic EEG real
Epileptogenic localization is a critical factor for successful epilepsy surgery. Therefore, it is meaningful to classify the epileptic EEG Data and nonepileptic EEG Data accurately. The main process for EEG data classification can be seen in Figure 1.
Figure 1: EEG Data Classification
Our target in this assignment is classifying the epileptic EEG Data and nonepileptic EEG Data based on the given feature sets.
At the beginning of the assignment, 8900 cases of patients’ data are given as attachments. They include 5950 cases of training data and 2950 cases of testing data (2 sheets in excel workbook). For all the 8900 cases, there are 8 data sets which are feature data sets (x1, x2, x3, x4, x5, x6, x7, and x8). In addition, here is a label for each case to show whether it is epileptic EEG Data (S) or nonepileptic EEG data).
The 8 feature data sets are calculated from the raw EEG data using 8 different feature extraction methods (First Quartile Q1, Third Quartile Q3, Q1-Q3, Standard Deviation, Min, Max, Mean, and Median). However, all the feature data x1 from different cases are calculated by the same feature extracting method. So do x2, x3, x4, x5, x6, x7 and x8.
Let’s check for missing values in the given dataset, and we have no missing values. we can proceed further
• Analyze the data sets given
We can look at the distribution of all the Independent Variables in the Data set Features x7 and x8 have Normal Distribution,x4,x6,x2 are positively Skewed and the rest of the features are negatively Skewed.
We have a lot of values that are highly correlated, for further training we’ll be removing the columns that are highly positively correlated i.e (in our case >0.95)
- According to the data sets and research outcome, we have Used Decision trees and Support Vector Machine
- Decision Trees:
Decision trees build classification or regression models in the form of tree structures. It decomposes a data set into smaller and smaller subsets while gradually growing a related decision tree. The result is a tree with decision nodes and leaf nodes as a non-parametric supervised learning technique, decision trees are employed for both classification and regression problems. Classification trees are tree models where the goal variable can take a discrete set of values.
- Support Vector Machine :
Margin-maximization-based support vector machines (SVMs) are special linear classifiers. To achieve high generalization, they employ structural risk minimization, which increases the classifier’s complexity.
Training Decision trees and Support Vector Machine Models
Here’s the training of the Decision Tree Model, and it’s evident from the variable Importance table that x4 is the most important feature to classify the target value, followed by x3 and x5.
Let’s look at the performance of model 1(i.e Decision tree)
From the results it’s quite evident that the Decision Trees were performing so great on the Test data as well, we have got an accuracy of 99.8%.
2.Support Vector Machine
Here’s the training of the SVM model, with train dataset and even SVM performs well with an accuracy of 96.9% on the Test data set.
Comparing the results
Results of Decision Tree and Support Vector Machines
From the comparison table we can observe that out of all the metrics Decision Trees were performing great compared to SVM
SVM uses kernel tricks to solve non-linear problems whereas decision trees derive hyper-rectangles in input space to solve the problem.
Decision trees are better for categorical data and it deals collinearity better than SVM.