# An Automatic Epilepsy Detection Method Based on Improved Inductive Transfer Learning

Authors: Yufeng Yao; Zhiming Cui
Journal: Computational and Mathematical Methods in Medicine
 (2020)

---

## Abstract

Epilepsy is a chronic disease caused by sudden abnormal discharge of brain neurons, causing transient brain dysfunction. The seizures of epilepsy have the characteristics of being sudden and repetitive, which has seriously endangered patients’ health, cognition, etc. In the current condition, EEG plays a vital role in the diagnosis, judgment, and qualitative location of epilepsy among the clinical diagnosis of various epileptic seizures and is an indispensable means of detection. The study of the EEG signals of patients with epilepsy can provide a strong basis and useful information for in-depth understanding of its pathogenesis. Although, intelligent classification technologies based on machine learning have been widely used to the classification of epilepsy EEG signals and show the effectiveness. In fact, it is difficult to ensure that there is always enough EEG data available for training the model in real life, which will affect the performance of the algorithms. In view of this, to reduce the impact of insufficient data on the detection performance of the algorithms, a novel discriminate least squares regression- (DLSR-) based inductive transfer learning method was introduced which is on the basis of DLSR and the inductive transfer learning. And, it is applied to promote the adaptability and accuracy of the epilepsy EEG signal recognition. The proposed method inherits the advantages of DLSR; it can be more suitable for classification scenarios by expanding the interval between different classes. Meanwhile, it can simultaneously use the data of the target domain and the knowledge of the source domain, which is helpful for getting better performance. The results show that the improved method has more advantages in EEG signal recognition comparing to several other representative methods.


---

## Body

## 1. Introduction

At present, epilepsy has become a common disease in neurology. Its pathogenesis has not yet been fully elucidated, and it is usually defined as a chronic neurological disease caused by sudden abnormal discharge of brain neurons. The epileptic seizures are sudden and repetitive. Its onset is accompanied by clinical manifestations such as loss of consciousness, fainting, and twitching of extremities. It also has cognitive and mental disorders that seriously endanger patients’ health, cognition, etc. [1, 2]. According to statistics, more than one percent of the world’s population suffer from the disease [3], and there are approximately 9 million people with epilepsy in China. Therefore, the depth research and prevention of epilepsy play an indispensable role to alleviate the suffering of patients, improve the quality of life, and promote healthy development. As an important method for studying epilepsy, EEG uses electrodes to record the electrical activity of nerve cells in the brain, which contains a large amount of physiological and pathological information, and is of great importance in the clinical examination, location, and therapy of epilepsy. Therefore, for people with a tendency to epilepsy, automatic detection of epilepsy can analyze and screen the EEG signals of people at high risk for epilepsy, so as to realize early detection, perform timely intervention, and reduce the impact of epilepsy on people and the incidence of epilepsy. In view of this, it is of great value to study the epilepsy automatic detection algorithm based on EEG signals and develop an efficient and accurate epilepsy automatic detection system.In fact, the study of automatic epileptic detection based on EEG signals has attracted extensive attention from scholars and experts at home and abroad since the 1970s. To predict the onset or preonset of epilepsy in the process of seizure detection, machine learning and pattern classification algorithms are generally applied to classify the EEG signals after extracting the characteristics of the time domain, frequency domain, time frequency domain, or nonlinear domain of the EEG. With the development of computer technology and digital signal processing technology, more and more methods are widely used in the study of seizure detection methods and have achieved certain research results, such as the Bayesian classifier [4], artificial neural network [5–9], support vector machine (SVM) [10–13], and fuzzy reasoning [14, 15]. For example, Obeyli extracted the Lyapunov exponential features of EEG signals and used probabilistic neural networks to classify EEG signals, so as to achieve high classification results [9]. Chan et al. extracted the time-frequency features of five subbands in the wavelet transform domain of epilepsy EEG signals and then used support vector machines and cluster regression models to recognize the onset of seizures. Aarabi et al. [14] extracted the features such as sample entropy, dominant frequency, average amplitude, and amplitude variation coefficient of intracranial EEG da4ta of patients with epilepsy and used the established fuzzy inference rules to fuse the EEG feature information for seizure detection. Although many of the above intelligent classification methods have shown the effectiveness of epilepsy EEG signal classification, they still face a challenge, that is, it is very hard to get enough EEG data for epilepsy to train the model in real life. Therefore, it has important practical value to explore how to use the knowledge acquired from related fields to enhance the classification performance of EEG data in the current scenario [16].To solve the above challenges, a novel inductive transfer learning method based on discriminant least squares regression (TDLSR) was proposed. Meanwhile, it was applied to specific medical application scenarios, namely, epilepsy EEG signal classification, so as to relieve the effect of severe data shortage on the performance of the algorithms. Transfer learning is an effective way to transfer knowledge from related fields and is helpful of obtaining more information in the absence of sufficient data or information. It focuses on how to use the useful information from similar but different source domains to improve the classification result of the classifier in the target domain. When studying epilepsy EEG signal classification, the inductive transfer learning method naturally becomes the first choice because of insufficient labeled epilepsy EEG samples in the target domain sometimes. What is more, since the discriminant LSR is still based on least squares regression (LSR) [17], which can explain the importance of each feature in the prediction model based on the original data space, we introduced the inductive transfer learning method based on DLSR to use for epilepsy EEG signal classification. In summary, the innovations of this work are summarized as follows:Point 1. The improved method is on the basis of the inductive transfer learning, but it has some difference from the traditional inductive transfer learning. The latter directly transfers the samples or features used in the source domain to the target domain for transfer learning, while the former uses a knowledge lever mechanism that transfers some knowledge from the source domain to the target domain. Then, the security of the data in the source domain can be well protected, and the data in the target domain and the knowledge in the source domain can be used simultaneously, so that the classification effect is better.Point 2. The improved method expands DLSR that can be well applied to classification scenes into a novel method with certain transfer learning ability, so that it can be used in more complex scenes.Point 3. The improved method inherits the characteristics of DLSR, that is, it can be better applied to classification scenarios by expanding the interval between different categories. And, it can transfer knowledge from the source domain, thus ensuring the rationality of its training model.Finally, to better illustrate the basic idea of this study, the structure of the paper is as follows:Part 1. Introduction to the research background, status, and significance of the thesis.Part 2. The related work, including the related technology of epilepsy EEG signal detection and the epilepsy EEG signal classification based on transfer learning, is summarized in advance so that the following sections become more readable.Part 3. The notations of the inductive transfer learning algorithm based on DLSR was introduced in detail.Part 4. The reliability and validity of TDLSR algorithm in detection of epilepsy EEG signals based on a series of experimental were verified.


## 2. Related Work

Automatic epilepsy detection is based on signal processing technology and pattern recognition. It analyzes EEG data to identify the location and duration of seizures. Usually, the EEG signals collected during seizures was called seizure EEG, and the EEG signals collected in the nonseizure are called nonseizure EEG. The problem of automatic detection of epilepsy EEG is to effectively judge the above two types of EEG signals and identify seizures. The related detection technologies are introduced as follows.


### 2.1. The Related Technology of Epilepsy EEG Signal Detection

Because the EEG signal of epilepsy is easily interfered by many factors, it is very random, and it is a nonstationary signal, and its rule is generally difficult to grasp. Therefore, researchers often use quantitative analysis to extract characteristic information of epilepsy EEG signals. The existing methods of automatic epilepsy detection include the following:(1)
Time-domain analysis: time-domain analysis is one of the earliest methods used in signal analysis. It analyzes the time-domain waveforms of EEG signals to study the difference between EEG waveform during seizures and EEG waveform during nonseizures, and directly extracts the waveform characteristics of the signals to distinguish the two types of EEG signals. The time-domain analysis method has the characteristics of intuitiveness and clear physical meaning, and it can reflect the important information in transient waveform such as spike wave and harp wave. The representative methods of time-domain analysis have a template matching method, time-domain waveform, or energy characteristics, etc. In 2001, Litt et al. [18] performed feature extraction on EEG signals based on time-domain analysis methods. In addition, researchers performed time-domain analysis of EEG signals to extract waveforms or energy features different from background activities and use amplitude, rhythm, period, and other parameters as classification criteria to identify epilepsy EEG signals. Gotman et al. performed a “half-wave” decomposition of EEG signals and then extracted EEG features, including average amplitude, duration, and coefficient of variation relative to the background, and set thresholds based on expert experience. The characteristic parameters are compared with the threshold to judge whether it is an epilepsy signal [19–21]. Time-domain analysis only performs statistical analysis from the time domain, and it is easy to miss other important changes in abnormal signals, such as slow waves(2)
Frequency analysis: unlike time-domain analysis, which mainly analyzes the waveform characteristics of epilepsy EEG, frequency domain analysis analyzes the frequency characteristics of EEG. It recognizes different rhythms according to the frequency of brain waves. Each brain wave of different rhythms corresponds to epilepsy EEG signals in different time periods or different parts of the brain [22]. Frequency domain analysis is based on the Fourier transform and is mainly used for power spectrum analysis of EEG signals. It performs the Fourier transform on the EEG signal to obtain its frequency components and spectrum distribution and extracts the corresponding EEG features in the frequency domain for epilepsy detection and recognition. Representative methods include power spectrum estimation, autoregressive (AR) model spectrum estimation, and higher order spectrum [23]. Among them, the power spectrum estimation transforms the EEG signal whose amplitude changes with time into the EEG spectrum chart with power varying with frequency and analyzes the distribution and change of each frequency band of the EEG signal intuitively and quantitatively [24, 25]. Although frequency domain analysis can provide a lot of effective information, allowing researchers to detect epilepsy based on the frequency domain characteristics of EEG, the overall spectrum of the signal obtained by the Fourier transform neither can reflect the local characteristics of the signal nor can reflect the signal frequency component changes with time. Therefore, the detection results obtained by frequency domain analysis are not very satisfactory and are greatly restricted in practical applications(3)
Time-frequency analysis: the epilepsy EEG is a typical nonstationary signal, which contains not only the waveform parameter characteristics in the time domain but also the energy distribution characteristics in the frequency domain. However, neither the above two methods can fully extract the transient characteristics and information of the EEG signals and can get the ideal results. With the development of digital signal theory and methods, the time-frequency analysis method combining time domain and frequency domain is widely used in the analysis of nonstationary EEG signals. It can obtain time and frequency domain information at the same time and capture transient information of EEG. In recent years, more and more studies have adopted time-frequency analysis methods to analyze EEG signals, among which various wavelet change methods are represented. The wavelet transform uses the translation and expansion of the window function to implement a wide time window for the low-frequency components of the signal and a narrow time window for the high-frequency components to complete the multiscale analysis of the signal. This analysis method conforms to the laws of nature and has a good ability to characterize the local characteristics of the signal [26]. It can capture the transient characteristics of the EEG signal and accurately locate it in the time and frequency domains. In addition to wavelet transform, commonly used time-frequency analysis methods also include empirical mode decomposition [27–30], the Wigner-Ville distribution [31, 32], and the Stockwell transform [33, 34]. However, most of these time-frequency analysis methods can only be used for multiresolution analysis of the original signal and then need to be combined with other algorithms to achieve the feature extraction and selection of EEG. Figure 1 shows the comparison of time-domain analysis, frequency domain analysis, and wavelet transform analysis.Observe the above figures, it is easy to draw a conclusion that the time-frequency analysis can provide more useful information compared to time-domain analysis and frequency domain analysis. In Figure1(c), the wavelet transform improves the time resolution at the high frequency of the signal by changing the time window and improves the frequency resolution at the low frequency, which has a better classification effect(4)
Nonlinear dynamic analysis: nowadays, with the progress of nonlinear dynamics theory, researchers are devoted to studying the nonlinear of EEG signals to solve the problem of automatic detection of epilepsy. Using nonlinear dynamics theory methods for EEG signal analysis, various nonlinear features of EEG signals can be extracted to distinguish epilepsy EEG signals from normal EEG signals. This provides some new research ideas for automatic epilepsy detection technology. Kannathal et al. used different entropies to measure the chaotic characteristics of EEG signals and used them as EEG features to distinguish EEG signals in different periods [35], including the Shannon entropy, Renyi entropy, Kolmogorov-Sinai entropy, and approximate entropy. The results show that the complexity of the EEG signal in patients with epilepsy during the intermittent period is higher than that during the seizure period, that is, the complexity of the EEG signal during the seizure is reduced, and the bet value is less than the normal EEG signal. Although nonlinear analysis can reflect the dynamic mechanism of seizures well, most of the nonlinear features are computationally intensive and generally time-consuming, which is not suitable for real-time epilepsy automatic detection systems.Figure 1
Comparison of time-domain analysis, frequency domain analysis, and time-frequency analysis. (a) Time-domain analysis. (b) Frequency analysis (Fourier transform). (c) Wavelet transform.
(a)(b)(c)


### 2.2. The Epilepsy EEG Signal Classification Based on Transfer Learning

Traditional classification methods use a large amount of data with label information to train a decision function and then use this function to classify and identify test samples with unknown label information. However, these classification methods all have a presupposition: training data and test data need to obey the same distribution characteristics, as shown in Figure2. For the differences in the distribution of training samples and test samples as described above, the performance of the traditional methods significantly decrease, as shown in Figure 3. In response to this challenge, transfer learning is a promising research direction. Transfer learning focuses on knowledge transfer problems that are similar to different domains or have different data distributions. It enhances the performance of the classifier used for target area recognition by learning useful knowledge from the source domain. According to whether the target domain used contains samples with labeled information, transfer learning techniques are divided into three categories: inductive transfer learning method, direct transductive transfer learning method, and unsupervised transfer learning method [36].. In the paper, we will focus on an inductive transfer learning method with good performance, that is, inductive transfer learning method based on discriminant least squares regression (TDLSR). And, its application and actual effect in EEG signal detection of epilepsy will be studied. The framework structure of epilepsy EEG signal detection based on transfer learning theory is given, as shown in Figure 4.Figure 2
Scene suitable for the traditional method.Figure 3
New challenge for the traditional methods.Figure 4
Framework of adaptive recognition for epileptic EEG signals based on transfer learning.In short, transfer learning is to transfer the knowledge (useful knowledge) from the source domain with a large amount of labeled data for learning in the target domain with no or little labeled data, thereby improving the training quality of the target domain. This can reduce the workload of collecting labeled data in the target domain.


## 2.1. The Related Technology of Epilepsy EEG Signal Detection

Because the EEG signal of epilepsy is easily interfered by many factors, it is very random, and it is a nonstationary signal, and its rule is generally difficult to grasp. Therefore, researchers often use quantitative analysis to extract characteristic information of epilepsy EEG signals. The existing methods of automatic epilepsy detection include the following:(1)
Time-domain analysis: time-domain analysis is one of the earliest methods used in signal analysis. It analyzes the time-domain waveforms of EEG signals to study the difference between EEG waveform during seizures and EEG waveform during nonseizures, and directly extracts the waveform characteristics of the signals to distinguish the two types of EEG signals. The time-domain analysis method has the characteristics of intuitiveness and clear physical meaning, and it can reflect the important information in transient waveform such as spike wave and harp wave. The representative methods of time-domain analysis have a template matching method, time-domain waveform, or energy characteristics, etc. In 2001, Litt et al. [18] performed feature extraction on EEG signals based on time-domain analysis methods. In addition, researchers performed time-domain analysis of EEG signals to extract waveforms or energy features different from background activities and use amplitude, rhythm, period, and other parameters as classification criteria to identify epilepsy EEG signals. Gotman et al. performed a “half-wave” decomposition of EEG signals and then extracted EEG features, including average amplitude, duration, and coefficient of variation relative to the background, and set thresholds based on expert experience. The characteristic parameters are compared with the threshold to judge whether it is an epilepsy signal [19–21]. Time-domain analysis only performs statistical analysis from the time domain, and it is easy to miss other important changes in abnormal signals, such as slow waves(2)
Frequency analysis: unlike time-domain analysis, which mainly analyzes the waveform characteristics of epilepsy EEG, frequency domain analysis analyzes the frequency characteristics of EEG. It recognizes different rhythms according to the frequency of brain waves. Each brain wave of different rhythms corresponds to epilepsy EEG signals in different time periods or different parts of the brain [22]. Frequency domain analysis is based on the Fourier transform and is mainly used for power spectrum analysis of EEG signals. It performs the Fourier transform on the EEG signal to obtain its frequency components and spectrum distribution and extracts the corresponding EEG features in the frequency domain for epilepsy detection and recognition. Representative methods include power spectrum estimation, autoregressive (AR) model spectrum estimation, and higher order spectrum [23]. Among them, the power spectrum estimation transforms the EEG signal whose amplitude changes with time into the EEG spectrum chart with power varying with frequency and analyzes the distribution and change of each frequency band of the EEG signal intuitively and quantitatively [24, 25]. Although frequency domain analysis can provide a lot of effective information, allowing researchers to detect epilepsy based on the frequency domain characteristics of EEG, the overall spectrum of the signal obtained by the Fourier transform neither can reflect the local characteristics of the signal nor can reflect the signal frequency component changes with time. Therefore, the detection results obtained by frequency domain analysis are not very satisfactory and are greatly restricted in practical applications(3)
Time-frequency analysis: the epilepsy EEG is a typical nonstationary signal, which contains not only the waveform parameter characteristics in the time domain but also the energy distribution characteristics in the frequency domain. However, neither the above two methods can fully extract the transient characteristics and information of the EEG signals and can get the ideal results. With the development of digital signal theory and methods, the time-frequency analysis method combining time domain and frequency domain is widely used in the analysis of nonstationary EEG signals. It can obtain time and frequency domain information at the same time and capture transient information of EEG. In recent years, more and more studies have adopted time-frequency analysis methods to analyze EEG signals, among which various wavelet change methods are represented. The wavelet transform uses the translation and expansion of the window function to implement a wide time window for the low-frequency components of the signal and a narrow time window for the high-frequency components to complete the multiscale analysis of the signal. This analysis method conforms to the laws of nature and has a good ability to characterize the local characteristics of the signal [26]. It can capture the transient characteristics of the EEG signal and accurately locate it in the time and frequency domains. In addition to wavelet transform, commonly used time-frequency analysis methods also include empirical mode decomposition [27–30], the Wigner-Ville distribution [31, 32], and the Stockwell transform [33, 34]. However, most of these time-frequency analysis methods can only be used for multiresolution analysis of the original signal and then need to be combined with other algorithms to achieve the feature extraction and selection of EEG. Figure 1 shows the comparison of time-domain analysis, frequency domain analysis, and wavelet transform analysis.Observe the above figures, it is easy to draw a conclusion that the time-frequency analysis can provide more useful information compared to time-domain analysis and frequency domain analysis. In Figure1(c), the wavelet transform improves the time resolution at the high frequency of the signal by changing the time window and improves the frequency resolution at the low frequency, which has a better classification effect(4)
Nonlinear dynamic analysis: nowadays, with the progress of nonlinear dynamics theory, researchers are devoted to studying the nonlinear of EEG signals to solve the problem of automatic detection of epilepsy. Using nonlinear dynamics theory methods for EEG signal analysis, various nonlinear features of EEG signals can be extracted to distinguish epilepsy EEG signals from normal EEG signals. This provides some new research ideas for automatic epilepsy detection technology. Kannathal et al. used different entropies to measure the chaotic characteristics of EEG signals and used them as EEG features to distinguish EEG signals in different periods [35], including the Shannon entropy, Renyi entropy, Kolmogorov-Sinai entropy, and approximate entropy. The results show that the complexity of the EEG signal in patients with epilepsy during the intermittent period is higher than that during the seizure period, that is, the complexity of the EEG signal during the seizure is reduced, and the bet value is less than the normal EEG signal. Although nonlinear analysis can reflect the dynamic mechanism of seizures well, most of the nonlinear features are computationally intensive and generally time-consuming, which is not suitable for real-time epilepsy automatic detection systems.Figure 1
Comparison of time-domain analysis, frequency domain analysis, and time-frequency analysis. (a) Time-domain analysis. (b) Frequency analysis (Fourier transform). (c) Wavelet transform.
(a)(b)(c)


## 2.2. The Epilepsy EEG Signal Classification Based on Transfer Learning

Traditional classification methods use a large amount of data with label information to train a decision function and then use this function to classify and identify test samples with unknown label information. However, these classification methods all have a presupposition: training data and test data need to obey the same distribution characteristics, as shown in Figure2. For the differences in the distribution of training samples and test samples as described above, the performance of the traditional methods significantly decrease, as shown in Figure 3. In response to this challenge, transfer learning is a promising research direction. Transfer learning focuses on knowledge transfer problems that are similar to different domains or have different data distributions. It enhances the performance of the classifier used for target area recognition by learning useful knowledge from the source domain. According to whether the target domain used contains samples with labeled information, transfer learning techniques are divided into three categories: inductive transfer learning method, direct transductive transfer learning method, and unsupervised transfer learning method [36].. In the paper, we will focus on an inductive transfer learning method with good performance, that is, inductive transfer learning method based on discriminant least squares regression (TDLSR). And, its application and actual effect in EEG signal detection of epilepsy will be studied. The framework structure of epilepsy EEG signal detection based on transfer learning theory is given, as shown in Figure 4.Figure 2
Scene suitable for the traditional method.Figure 3
New challenge for the traditional methods.Figure 4
Framework of adaptive recognition for epileptic EEG signals based on transfer learning.In short, transfer learning is to transfer the knowledge (useful knowledge) from the source domain with a large amount of labeled data for learning in the target domain with no or little labeled data, thereby improving the training quality of the target domain. This can reduce the workload of collecting labeled data in the target domain.


## 3. The Inductive Transfer Learning Algorithm Based on DLSR

To better describe the algorithm proposed in this paper, Table1 gives a detailed description of the symbols in the algorithm.Table 1
Symbol description.
SymbolDescriptionXTraining matrix of the target domain,X=x1,x,2⋯,xN and xi∈RdNTotal number of training samples of the target domaindDimension of sampleCThe number of classesYThe binary label matrix corresponding to the training samples in the target domain. Thejth column of Y indicates that only the data belonging to the jth class corresponds to an element equal to 1, and all other elements are 0BIndicator matrix constructed based onYWLabel offset matrix of the target domainZMapping matrix of target domainZSMapping matrix of source domaineVector representing all 1,e∈RNΘHadamard product operator for matrixpThe mapping offset vector of target domainλ,ηThe regularization parameterSince DLSR is a nontransforming algorithm, the symbols in Table1 refer to the parameter variables of the original training sample.


### 3.1. The Least Squares Regression

As a widely used method based on statistical theory, LSR has become a typical method. LSR uses the Frobenius norm to constrain the matrix of representation coefficients. In the paper, to expand the classification ability of the LSR algorithm, we preconstructed the binary label matrixY corresponding to the training samples X, so that it can better cope with more complex classification scenarios. The jth column of Y indicates that only the data belonging to the jth class corresponds to an element equal to 1, and all other elements are 0. Then, the objective function of LSR can be redefined as follows:
(1)argminZXZ−YF2+λZF2.Since the LSR has an analytical solution, which can be easily obtained, formula (1) can be rewritten as:
(2)JZ=argminZXZ−YF2+λZF2.Then, the solution process of the analytical solution of LSR is as follows: let(3)∂JZ∂Z=0,⟹2XTXZ−2XTY+2λZ=0,⟹XTX+λIdZ=XTY.Finally, the analytical solution of LSR can be obtained as(4)Z=XTX+λId−1XTY.


### 3.2. The Discriminate Least Squares Regression

As we know, LSR can be directly used for classification tasks. However, since the interval between any two different classes in the constructed binary class label matrix is2, the DLSR proposed in literature [37] introduces the relaxation technique into the LSR so as to expand the interval between the two data from different classes. To improve the compactness of the classification task, DLSR will comprehensively consider the class factors and build an indicator matrix B on the basis of the binary label matrix Y of the sample. Each element of matrix B is defined as follows:
(5)B=ij+1,ifyi=1,−1,otherwise.In essence, each element of matrixB represents the offset direction of the corresponding class label. Then, ε relaxation on each element of Y is performed, and the amount of ε relaxation through the matrix W is recorded. Then, the objective function of DLSR can be expressed as
(6)mins.t.W≥0XZ+epT−Y+BΘWF2+λZF2.The objective function of DLSR is a convex optimization problem. However, it cannot directly optimize the solution. Literature [37] adopts an alternative optimization strategy and ensures that a closed solution is obtained at each step. The specific derivation process is as follows:
(1)
FixW, and update Z and p. Let L=Y+BΘW; formula (6) can be rewritten as
(7)JZ,p=argminZ,pXZ+epT−LF2+λZF2.According to the optimization theory, we take a partial derivative ofp, namely
(8)∂JZ,p∂p=0,⟹ZTXTe+peTe−LTe=0,⟹p=LTe−ZTXTeN.Furthermore, we find the partial derivative ofZ, and we can get
(9)∂JZ∂Z=0,⟹2XTXZ−2XTepT−L+2λZ=0,⟹XTXZ−XTeeTL−eTXZN−L+λZ=0,⟹XTIN−eeTNXZ−XTIN−eeTNL+λZ=0,⟹Z=XTHX+λId−1XTHL(2)
FixZ and p, and update W. Let G=XZ+epT−Y; then, W can be solved as follows:
(10)argminWs.t.W≥0G−BΘWF2.According to literature [37], the Frobenius norm square of a matrix can be solved element by element, so Eq. (10) can be equivalent to solve N×C subproblems. For element Wij in row i and column j, there can be
(11)minWijGij−BijWij2s.t.Wij≥0,where Gij and Bij represent the jth element of the ith row of the matrix G and matrix B, respectively and satisfy Bij2=1. Then, we can get
(12)Gij−BijWij2=BijGij−Wij2.And, because each element ofW satisfies Wij≥0, formula (12) can be written as
(13)Wij=maxBijGij,0.Therefore, the final solution formula ofW is:
(14)W=maxBΘG,0.According to the above derivation, Algorithm1 gives a detailed description of the DLSR algorithm.Algorithm 1: The description of the DLSR algorithm.
The description of DLSRInput:The training samplesX=x1,x2,⋯xN∈RN×d, and their corresponding class labels yi∈1,2,⋯Ci=1,2,⋯,N, where xi∈Rdi=1,2,⋯,N. The maximum number of iterations is T.Output:The mapping matrixZ and the translation vector p.Training:Step 1: Construct the label matrixY and the indicator matrix B, respectively.Step 2: Get the value ofλ by grid searching in the set of {10-4, 10-3, 10-2, 10-1, 100, 10, 102}.Step 3: InitializeZ′=0,p=0,andW=0. Set t=1.Step 4: Update Q byQ=XTHX+λId−1XTH.RepeatStep 5: Update the label matrixL by L=Y+BΘW.Step 6: Updatep and Z by Eqs. (8) and (10).Step 7: Update the regression error matrixG by G=XZ+epT−Y.Step 8: Update the label shift matrixW by Eq. (14).Step 9: LetZ′=Z and t=t+1UntilZ′−ZF2≤10−4ort>T.Step 10: OutputZ and p.


### 3.3. The Inductive Transfer Learning Algorithm Based on DLSR

Most inductive transfer learning algorithms are implemented by directly learning from the data in the source domain through some classes. However, in the paper, we used a knowledge-based inductive transfer learning framework instead of raw data to study inductive transfer learning methods based on source domain knowledge. Inspired by this, an inductive transfer learning algorithm based on DLSR was introduced. Its objective function is(15)minZ,pXZ+epT−Y+BΘWF2s.t.W≥0+λZF2+ηZ−Zs2.It can be found from the formula (15) that the first two items directly inherit the DLSR for learning in the target domain. The third item is used to transfer the knowledge Zs of the source domain to the target domain. When η=0, DSLR is DSLR.In short, TDLSR summarizes DLSR from the perspective of transfer learning, but it has more transfer learning capabilities than DLSR and has better applicability. Similar to DLSR, the objective function of TDLSR can also be solved using an alternate optimization strategy. The specific derivation process is as follows:(1)
FixW, and update Z and p. Let L=Y+BΘW; formula (15) can be rewritten as
(16)JZ,p=argminZ,pXZ+epT−LF2+λZF2+ηZ−ZSF2.According to the optimization theory, we take a partial derivative ofp, namely
(17)∂JZ,p∂p=0,⟹ZTXTe+peTe−LTe=0,⟹p=LTe−ZTXTeN.Furthermore, we find the partial derivative ofZ, we can get
(18)∂JZ∂Z=0,⟹2XTXZ−2XTepT−L+2λZ+2ηZ−ZS=0,⟹XTXZ−XTeeTL−eTXZN−L+λZ+ηZ−ZS=0,⟹XTIN−eeTNXZ−XTIN−eeTNL+λ+ηZ−ηZS=0,⟹Z=XTHX+λ+ηId−1XTHL+ηZS(2)
FixZ and p, and update W. Let G=XZ+epT−Y; then, W can be solved as:
(19)argminWs.t.W≥0G−BΘWF2.Similar to the way of solvingW in DLSR, the final solution formula of W is:
(20)W=maxBΘG,0.According to the above derivation process, Algorithm2 gives a detailed description of the TDLSR algorithm.Algorithm 2: The description of the TDLSR algorithm.
The description of TDLSRInput:The training samples in target domainX=x1,x2,⋯xN∈RN×d, and their corresponding class labels yi∈1,2,⋯Ci=1,2,⋯,N, where xi∈Rdi=1,2,⋯,N. The maximum number of iterations is T. AS is learned in advanced by using DLSR from source domain.Output:The mapping matrixZ and the translation vector p.Training:Step 1: Construct the label matrixY and the indicator matrix B, respectively.Step 2: Get the value ofλ and η by grid searching in the set of {10-4, 10-3, 10-2, 10-1, 100, 10, 102}, respectively.Step 3: InitializeZ′=0,p=0,andW=0. Set t=1.Step 4: ComputeQ by Q=XTHX+λId−1XTH and V by V=ηXTHX+λ+ηId−1ZS, respectively.RepeatStep 5: Update the label matrixL by L=Y+BΘW.Step 6: Updatep and Z by Eqs. (17) (18).Step 7: Update the regression error matrixG by G=XZ+epT−Y.Step 8: Update the label shift matrixW by Eq. (20).Step 9: LetZ′=Z and t=t+1UntilZ′−ZF2≤10−4ort>T.Step 10: OutputZ and p.To understand the TDLSR algorithm more clearly, Figure5 shows the specific process of the TDLSR.Figure 5
The process of the TDLSR algorithm.


## 3.1. The Least Squares Regression

As a widely used method based on statistical theory, LSR has become a typical method. LSR uses the Frobenius norm to constrain the matrix of representation coefficients. In the paper, to expand the classification ability of the LSR algorithm, we preconstructed the binary label matrixY corresponding to the training samples X, so that it can better cope with more complex classification scenarios. The jth column of Y indicates that only the data belonging to the jth class corresponds to an element equal to 1, and all other elements are 0. Then, the objective function of LSR can be redefined as follows:
(1)argminZXZ−YF2+λZF2.Since the LSR has an analytical solution, which can be easily obtained, formula (1) can be rewritten as:
(2)JZ=argminZXZ−YF2+λZF2.Then, the solution process of the analytical solution of LSR is as follows: let(3)∂JZ∂Z=0,⟹2XTXZ−2XTY+2λZ=0,⟹XTX+λIdZ=XTY.Finally, the analytical solution of LSR can be obtained as(4)Z=XTX+λId−1XTY.


## 3.2. The Discriminate Least Squares Regression

As we know, LSR can be directly used for classification tasks. However, since the interval between any two different classes in the constructed binary class label matrix is2, the DLSR proposed in literature [37] introduces the relaxation technique into the LSR so as to expand the interval between the two data from different classes. To improve the compactness of the classification task, DLSR will comprehensively consider the class factors and build an indicator matrix B on the basis of the binary label matrix Y of the sample. Each element of matrix B is defined as follows:
(5)B=ij+1,ifyi=1,−1,otherwise.In essence, each element of matrixB represents the offset direction of the corresponding class label. Then, ε relaxation on each element of Y is performed, and the amount of ε relaxation through the matrix W is recorded. Then, the objective function of DLSR can be expressed as
(6)mins.t.W≥0XZ+epT−Y+BΘWF2+λZF2.The objective function of DLSR is a convex optimization problem. However, it cannot directly optimize the solution. Literature [37] adopts an alternative optimization strategy and ensures that a closed solution is obtained at each step. The specific derivation process is as follows:
(1)
FixW, and update Z and p. Let L=Y+BΘW; formula (6) can be rewritten as
(7)JZ,p=argminZ,pXZ+epT−LF2+λZF2.According to the optimization theory, we take a partial derivative ofp, namely
(8)∂JZ,p∂p=0,⟹ZTXTe+peTe−LTe=0,⟹p=LTe−ZTXTeN.Furthermore, we find the partial derivative ofZ, and we can get
(9)∂JZ∂Z=0,⟹2XTXZ−2XTepT−L+2λZ=0,⟹XTXZ−XTeeTL−eTXZN−L+λZ=0,⟹XTIN−eeTNXZ−XTIN−eeTNL+λZ=0,⟹Z=XTHX+λId−1XTHL(2)
FixZ and p, and update W. Let G=XZ+epT−Y; then, W can be solved as follows:
(10)argminWs.t.W≥0G−BΘWF2.According to literature [37], the Frobenius norm square of a matrix can be solved element by element, so Eq. (10) can be equivalent to solve N×C subproblems. For element Wij in row i and column j, there can be
(11)minWijGij−BijWij2s.t.Wij≥0,where Gij and Bij represent the jth element of the ith row of the matrix G and matrix B, respectively and satisfy Bij2=1. Then, we can get
(12)Gij−BijWij2=BijGij−Wij2.And, because each element ofW satisfies Wij≥0, formula (12) can be written as
(13)Wij=maxBijGij,0.Therefore, the final solution formula ofW is:
(14)W=maxBΘG,0.According to the above derivation, Algorithm1 gives a detailed description of the DLSR algorithm.Algorithm 1: The description of the DLSR algorithm.
The description of DLSRInput:The training samplesX=x1,x2,⋯xN∈RN×d, and their corresponding class labels yi∈1,2,⋯Ci=1,2,⋯,N, where xi∈Rdi=1,2,⋯,N. The maximum number of iterations is T.Output:The mapping matrixZ and the translation vector p.Training:Step 1: Construct the label matrixY and the indicator matrix B, respectively.Step 2: Get the value ofλ by grid searching in the set of {10-4, 10-3, 10-2, 10-1, 100, 10, 102}.Step 3: InitializeZ′=0,p=0,andW=0. Set t=1.Step 4: Update Q byQ=XTHX+λId−1XTH.RepeatStep 5: Update the label matrixL by L=Y+BΘW.Step 6: Updatep and Z by Eqs. (8) and (10).Step 7: Update the regression error matrixG by G=XZ+epT−Y.Step 8: Update the label shift matrixW by Eq. (14).Step 9: LetZ′=Z and t=t+1UntilZ′−ZF2≤10−4ort>T.Step 10: OutputZ and p.


## 3.3. The Inductive Transfer Learning Algorithm Based on DLSR

Most inductive transfer learning algorithms are implemented by directly learning from the data in the source domain through some classes. However, in the paper, we used a knowledge-based inductive transfer learning framework instead of raw data to study inductive transfer learning methods based on source domain knowledge. Inspired by this, an inductive transfer learning algorithm based on DLSR was introduced. Its objective function is(15)minZ,pXZ+epT−Y+BΘWF2s.t.W≥0+λZF2+ηZ−Zs2.It can be found from the formula (15) that the first two items directly inherit the DLSR for learning in the target domain. The third item is used to transfer the knowledge Zs of the source domain to the target domain. When η=0, DSLR is DSLR.In short, TDLSR summarizes DLSR from the perspective of transfer learning, but it has more transfer learning capabilities than DLSR and has better applicability. Similar to DLSR, the objective function of TDLSR can also be solved using an alternate optimization strategy. The specific derivation process is as follows:(1)
FixW, and update Z and p. Let L=Y+BΘW; formula (15) can be rewritten as
(16)JZ,p=argminZ,pXZ+epT−LF2+λZF2+ηZ−ZSF2.According to the optimization theory, we take a partial derivative ofp, namely
(17)∂JZ,p∂p=0,⟹ZTXTe+peTe−LTe=0,⟹p=LTe−ZTXTeN.Furthermore, we find the partial derivative ofZ, we can get
(18)∂JZ∂Z=0,⟹2XTXZ−2XTepT−L+2λZ+2ηZ−ZS=0,⟹XTXZ−XTeeTL−eTXZN−L+λZ+ηZ−ZS=0,⟹XTIN−eeTNXZ−XTIN−eeTNL+λ+ηZ−ηZS=0,⟹Z=XTHX+λ+ηId−1XTHL+ηZS(2)
FixZ and p, and update W. Let G=XZ+epT−Y; then, W can be solved as:
(19)argminWs.t.W≥0G−BΘWF2.Similar to the way of solvingW in DLSR, the final solution formula of W is:
(20)W=maxBΘG,0.According to the above derivation process, Algorithm2 gives a detailed description of the TDLSR algorithm.Algorithm 2: The description of the TDLSR algorithm.
The description of TDLSRInput:The training samples in target domainX=x1,x2,⋯xN∈RN×d, and their corresponding class labels yi∈1,2,⋯Ci=1,2,⋯,N, where xi∈Rdi=1,2,⋯,N. The maximum number of iterations is T. AS is learned in advanced by using DLSR from source domain.Output:The mapping matrixZ and the translation vector p.Training:Step 1: Construct the label matrixY and the indicator matrix B, respectively.Step 2: Get the value ofλ and η by grid searching in the set of {10-4, 10-3, 10-2, 10-1, 100, 10, 102}, respectively.Step 3: InitializeZ′=0,p=0,andW=0. Set t=1.Step 4: ComputeQ by Q=XTHX+λId−1XTH and V by V=ηXTHX+λ+ηId−1ZS, respectively.RepeatStep 5: Update the label matrixL by L=Y+BΘW.Step 6: Updatep and Z by Eqs. (17) (18).Step 7: Update the regression error matrixG by G=XZ+epT−Y.Step 8: Update the label shift matrixW by Eq. (20).Step 9: LetZ′=Z and t=t+1UntilZ′−ZF2≤10−4ort>T.Step 10: OutputZ and p.To understand the TDLSR algorithm more clearly, Figure5 shows the specific process of the TDLSR.Figure 5
The process of the TDLSR algorithm.


## 4. Experimental Research

### 4.1. The Environment and Parameter Settings

To evaluate the performance of the TDLSR, a lot of experiments were carried out based on EEG signal recognition. Experiments will be conducted from two aspects: (1) the comparison experiments with classic LSR, SRC, RLR, DLSR, and SVM and (2) the comparison experiments with related methods with transform ability, such as AuSVM, Tr-Adaboost, TSVM, and LMPROJ. The hardware environment used in the experiment is Intel (R) Core(TM) I7-9700 3.0 GHz×2, 8 G RAM, and the software environment is Windows 10 64 bit, MATLAB R2012b. Table2 shows the parameter settings of the above algorithms.Table 2
The parameter settings in the experiments.
MethodsParameter settingsLSRThe regularization parameterλ∈10−4,10−3,10−2,10−1,100,10,102SRCThe regularization parameterα∈10‐3,5×10‐3,10‐2,2×10‐2,5×10‐2,10‐1RLRThe regularization parameterλ∈10−4,10−3,10−2,10−1,100; the heart parameter δ∈2‐5,2‐4,2‐3,⋯,23,24,25DLSRThe regularization parameterλ∈10−4,10−3,10−2,10−1,100,10,102SVMThe penalty factorc∈2‐5,2‐4,2‐3,⋯,23,24,25, the kernel parameter δ∈2‐5,2‐4,2‐3,⋯,23,24,25TSVMThe Lagrange multiplier upper boundc∈2‐5,2‐4,2‐3,⋯,23,24,25, the kernel parameter δ∈2‐5,2‐4,2‐3,⋯,23,24,25Au-SVMThe penalty factorc∈2‐5,2‐4,2‐3,⋯,23,24,25, the kernel parameter δ∈2‐5,2‐4,2‐3,⋯,23,24,25Tr-AdaboostThe penalty factorc∈2‐5,2‐4,2‐3,⋯,23,24,25, the kernel parameter δ∈2‐5,2‐4,2‐3,⋯,23,24,25LMPROJThe regularization parametersτ∈0.25,0.1,⋯,200,σ∈0.25,0.1,⋯,200, the kernel parameter δ∈0.25,0.1,⋯,200TDLSRThe regularization parameterλ∈10−4,10−3,10−2,10−1,100,10,102, η∈10−4,10−3,10−2,10−1,100,10,102


### 4.2. Experimental Dataset

In the experiments, the EEG dataset used for epilepsy is the Bonn dataset [38, 39], which was collected by Andrzejak et al. at an epilepsy center at the University of Bonn. The EEG dataset contains five datasets, denoted by A to E. This dataset compares the EEG of the patient during the onset and nononset period with the EEG of the normal person. Dataset A and dataset B are EEG signals collected by healthy testers with their eyes open and closed. Dataset C and dataset D are the EEG signals collected by epilepsy patients outside and inside the lesion during the seizure period, and dataset E is the EEG signals collected by the patients in dataset C and dataset D during the seizure. Each of the 5 datasets includes 100 single-channel EEGs (that is 100 samples), the sampling frequency is 173.61 Hz, each segment of the signal collects 4097 frequency points, and each EEG segment lasts 23.6 s.In our experiments, the use of the Bonn dataset is significantly different from many previous works. We constructed 8 subdatasets from the original 5 datasets to simulate different scenarios in the experiments. The source and target domains of the 8 subdatasets of experiments are composed of the partial data extracted from the 5 sets. We randomly select 75% of the data from a certain dataset as the source domain, and the remaining 25% as the target domain. The sample data of source and target domains of subdatasets 1-4 are derived from the same distribution, but the samples taken are different. The sample data of the source domain and the target domain of subdatasets 5-8 have different distributions. Finally, for the data in the target domain, 20% is randomly selected for testing, and the remaining 80% is used for training. In addition, the training and test datasets do not contain the same samples and are independent of each other. Table3 lists the detailed information of the 8 subdatasets.Table 3
The construction of experimental datasets.
The subdatasetSource domainTarget domainD1AE-each 75AE-each 25D2BDE-each 75BDE-each 25D3ABCD-each 75ABCD-each 25D4BCDE-each 75BCDE-each 25D5BE-each 75BC-each 25D6ACE-each 75BCE-each 25D7ADE-each 75BDE-each 25D8ACDE-each 75BCDE-each 25


### 4.3. Experimental Results and Analysis

To verify the effectiveness of TDLSR in epilepsy EEG data recognition, the comparative experiments were conducted among the classic algorithms. The experimental results are shown in Tables4 and 5, respectively.Table 4
Experimental results based on nontransfer learning algorithms.
DatasetsLSRSRCRLRDLSRSVMD10.870.840.890.900.82D20.790.720.810.800.74D30.710.620.720.720.68D40.710.640.700.720.66D50.820.780.830.840.78D60.730.600.720.740.61D70.700.600.700.720.59D80.630.530.650.640.50Table 5
Experimental results based on transfer learning algorithms.
DatasetsAu-SVMTSVMTr-AdaboostLMPROJTDLSRD10.900.920.890.920.96D20.820.850.820.840.90D30.720.750.730.760.83D40.720.750.710.780.82D50.850.860.840.870.91D60.750.780.750.800.83D70.710.780.740.780.83D80.680.700.660.700.73As shown in the above experimental results, the conclusions are summarized as follows:(1)
In the case of the same distribution of the source domain dataset and the target domain dataset, both the nontransfer learning algorithms and the transfer learning algorithms achieve good classification results. For the datasets with certain differences in distribution, the classification effects of algorithms without transforming abilities are quite different, and the experimental results of the algorithms in Table5 are generally better than results of the algorithms in Table 4(2)
As a whole, the performance of TDLSR introduced in this paper is obviously superior to all other algorithms. It means that by using the knowledge transferred from the source domain to the target domain, the TDLSR algorithm obtains better performance and becomes effective for epilepsy EEG recognition(3)
Comparing the performance of the algorithms in Table4, it can be found that DLSR has the best performance, while SRC and SVM have poor performance. This is because DLSR expands the ability to distinguish between classes by using the class information in the label space for the classification task. As the results shown in Table 5, the TDLSR algorithm performs best. This is because it not only inherits the advantages of DLSR by increasing the interval between different classes but also transfers more useful information from the source domain to the target domain. It has stronger transfer learning ability than several other algorithms. And because the TDLSR method requires fewer parameters to adjust, it is easier to use, and the stability and fault tolerance are stronger than the transfer learning algorithms such as LMPROJ.In addition, to further observe and compare the overall classification performance of all algorithms, Figures6 and 7 also give the average classification accuracy of each algorithm on all datasets.Figure 6
The average classification accuracy of all nontransfer learning algorithms.Figure 7
The average classification accuracy of all transfer learning algorithms.Observing Figures6 and 7, it can be seen that the classification accuracy of the algorithms on the same distributed dataset is higher than the result on the different distributed dataset. Secondly, compared with the traditional nontransfer learning algorithms, the algorithm with transfer learning ability has more advantages in classification performance, and the TDLSR has a significant improvement in classification performance. Finally, for all datasets with different classes, the performance of all algorithms decreases continuously as the number of categories increases. This is because as the number of classes increases, the information in the label space becomes more complicated, and learning the information in the label space becomes more difficult.Meanwhile, to further verify the reliability and stability of the algorithms, we randomly added 15% white Gaussian noise to the data in the source domain to prove that the algorithm in this paper can adapt to more complex scenarios. The experimental results are shown in Tables6 and 7, respectively.Table 6
Experimental results based on nontransfer learning algorithms with 15% noise in the source domain.
DatasetsLSRSRCRLRDLSRSVMD10.830.800.840.850.77D20.740.670.760.760.70D30.660.590.680.690.65D40.660.610.670.680.63D50.780.740.800.800.74D60.650.560.690.690.58D70.640.570.670.710.56D80.600.500.620.610.47Table 7
Experimental results based on transfer learning algorithms with 15% noise in the source domain.
DatasetsAu-SVMTSVMTr-AdaboostLMPROJTDLSRD10.870.860.890.890.93D20.790.790.820.810.87D30.690.700.720.730.80D40.690.680.720.750.79D50.820.810.830.840.88D60.720.720.750.770.80D70.680.710.750.750.80D80.650.630.670.670.70Through the above experimental results, it can be found that the classification performance of all nontransfer learning algorithms under noisy conditions decreases more. The reason is that they cannot obtain useful knowledge from noisy data (source domain) for classification. However, all the algorithms in Table7 can transfer some useful knowledge from the source domain for classification in the target domain, so their performance is better than the results in Table 6.In summary, the TDLSR algorithm introduced in the paper is superior to the other algorithms in the detection of epilepsy EEG signals. And, it is easy to learn and train, has high stability, and shows certain advantages compared with other intelligent algorithms.


## 4.1. The Environment and Parameter Settings

To evaluate the performance of the TDLSR, a lot of experiments were carried out based on EEG signal recognition. Experiments will be conducted from two aspects: (1) the comparison experiments with classic LSR, SRC, RLR, DLSR, and SVM and (2) the comparison experiments with related methods with transform ability, such as AuSVM, Tr-Adaboost, TSVM, and LMPROJ. The hardware environment used in the experiment is Intel (R) Core(TM) I7-9700 3.0 GHz×2, 8 G RAM, and the software environment is Windows 10 64 bit, MATLAB R2012b. Table2 shows the parameter settings of the above algorithms.Table 2
The parameter settings in the experiments.
MethodsParameter settingsLSRThe regularization parameterλ∈10−4,10−3,10−2,10−1,100,10,102SRCThe regularization parameterα∈10‐3,5×10‐3,10‐2,2×10‐2,5×10‐2,10‐1RLRThe regularization parameterλ∈10−4,10−3,10−2,10−1,100; the heart parameter δ∈2‐5,2‐4,2‐3,⋯,23,24,25DLSRThe regularization parameterλ∈10−4,10−3,10−2,10−1,100,10,102SVMThe penalty factorc∈2‐5,2‐4,2‐3,⋯,23,24,25, the kernel parameter δ∈2‐5,2‐4,2‐3,⋯,23,24,25TSVMThe Lagrange multiplier upper boundc∈2‐5,2‐4,2‐3,⋯,23,24,25, the kernel parameter δ∈2‐5,2‐4,2‐3,⋯,23,24,25Au-SVMThe penalty factorc∈2‐5,2‐4,2‐3,⋯,23,24,25, the kernel parameter δ∈2‐5,2‐4,2‐3,⋯,23,24,25Tr-AdaboostThe penalty factorc∈2‐5,2‐4,2‐3,⋯,23,24,25, the kernel parameter δ∈2‐5,2‐4,2‐3,⋯,23,24,25LMPROJThe regularization parametersτ∈0.25,0.1,⋯,200,σ∈0.25,0.1,⋯,200, the kernel parameter δ∈0.25,0.1,⋯,200TDLSRThe regularization parameterλ∈10−4,10−3,10−2,10−1,100,10,102, η∈10−4,10−3,10−2,10−1,100,10,102


## 4.2. Experimental Dataset

In the experiments, the EEG dataset used for epilepsy is the Bonn dataset [38, 39], which was collected by Andrzejak et al. at an epilepsy center at the University of Bonn. The EEG dataset contains five datasets, denoted by A to E. This dataset compares the EEG of the patient during the onset and nononset period with the EEG of the normal person. Dataset A and dataset B are EEG signals collected by healthy testers with their eyes open and closed. Dataset C and dataset D are the EEG signals collected by epilepsy patients outside and inside the lesion during the seizure period, and dataset E is the EEG signals collected by the patients in dataset C and dataset D during the seizure. Each of the 5 datasets includes 100 single-channel EEGs (that is 100 samples), the sampling frequency is 173.61 Hz, each segment of the signal collects 4097 frequency points, and each EEG segment lasts 23.6 s.In our experiments, the use of the Bonn dataset is significantly different from many previous works. We constructed 8 subdatasets from the original 5 datasets to simulate different scenarios in the experiments. The source and target domains of the 8 subdatasets of experiments are composed of the partial data extracted from the 5 sets. We randomly select 75% of the data from a certain dataset as the source domain, and the remaining 25% as the target domain. The sample data of source and target domains of subdatasets 1-4 are derived from the same distribution, but the samples taken are different. The sample data of the source domain and the target domain of subdatasets 5-8 have different distributions. Finally, for the data in the target domain, 20% is randomly selected for testing, and the remaining 80% is used for training. In addition, the training and test datasets do not contain the same samples and are independent of each other. Table3 lists the detailed information of the 8 subdatasets.Table 3
The construction of experimental datasets.
The subdatasetSource domainTarget domainD1AE-each 75AE-each 25D2BDE-each 75BDE-each 25D3ABCD-each 75ABCD-each 25D4BCDE-each 75BCDE-each 25D5BE-each 75BC-each 25D6ACE-each 75BCE-each 25D7ADE-each 75BDE-each 25D8ACDE-each 75BCDE-each 25


## 4.3. Experimental Results and Analysis

To verify the effectiveness of TDLSR in epilepsy EEG data recognition, the comparative experiments were conducted among the classic algorithms. The experimental results are shown in Tables4 and 5, respectively.Table 4
Experimental results based on nontransfer learning algorithms.
DatasetsLSRSRCRLRDLSRSVMD10.870.840.890.900.82D20.790.720.810.800.74D30.710.620.720.720.68D40.710.640.700.720.66D50.820.780.830.840.78D60.730.600.720.740.61D70.700.600.700.720.59D80.630.530.650.640.50Table 5
Experimental results based on transfer learning algorithms.
DatasetsAu-SVMTSVMTr-AdaboostLMPROJTDLSRD10.900.920.890.920.96D20.820.850.820.840.90D30.720.750.730.760.83D40.720.750.710.780.82D50.850.860.840.870.91D60.750.780.750.800.83D70.710.780.740.780.83D80.680.700.660.700.73As shown in the above experimental results, the conclusions are summarized as follows:(1)
In the case of the same distribution of the source domain dataset and the target domain dataset, both the nontransfer learning algorithms and the transfer learning algorithms achieve good classification results. For the datasets with certain differences in distribution, the classification effects of algorithms without transforming abilities are quite different, and the experimental results of the algorithms in Table5 are generally better than results of the algorithms in Table 4(2)
As a whole, the performance of TDLSR introduced in this paper is obviously superior to all other algorithms. It means that by using the knowledge transferred from the source domain to the target domain, the TDLSR algorithm obtains better performance and becomes effective for epilepsy EEG recognition(3)
Comparing the performance of the algorithms in Table4, it can be found that DLSR has the best performance, while SRC and SVM have poor performance. This is because DLSR expands the ability to distinguish between classes by using the class information in the label space for the classification task. As the results shown in Table 5, the TDLSR algorithm performs best. This is because it not only inherits the advantages of DLSR by increasing the interval between different classes but also transfers more useful information from the source domain to the target domain. It has stronger transfer learning ability than several other algorithms. And because the TDLSR method requires fewer parameters to adjust, it is easier to use, and the stability and fault tolerance are stronger than the transfer learning algorithms such as LMPROJ.In addition, to further observe and compare the overall classification performance of all algorithms, Figures6 and 7 also give the average classification accuracy of each algorithm on all datasets.Figure 6
The average classification accuracy of all nontransfer learning algorithms.Figure 7
The average classification accuracy of all transfer learning algorithms.Observing Figures6 and 7, it can be seen that the classification accuracy of the algorithms on the same distributed dataset is higher than the result on the different distributed dataset. Secondly, compared with the traditional nontransfer learning algorithms, the algorithm with transfer learning ability has more advantages in classification performance, and the TDLSR has a significant improvement in classification performance. Finally, for all datasets with different classes, the performance of all algorithms decreases continuously as the number of categories increases. This is because as the number of classes increases, the information in the label space becomes more complicated, and learning the information in the label space becomes more difficult.Meanwhile, to further verify the reliability and stability of the algorithms, we randomly added 15% white Gaussian noise to the data in the source domain to prove that the algorithm in this paper can adapt to more complex scenarios. The experimental results are shown in Tables6 and 7, respectively.Table 6
Experimental results based on nontransfer learning algorithms with 15% noise in the source domain.
DatasetsLSRSRCRLRDLSRSVMD10.830.800.840.850.77D20.740.670.760.760.70D30.660.590.680.690.65D40.660.610.670.680.63D50.780.740.800.800.74D60.650.560.690.690.58D70.640.570.670.710.56D80.600.500.620.610.47Table 7
Experimental results based on transfer learning algorithms with 15% noise in the source domain.
DatasetsAu-SVMTSVMTr-AdaboostLMPROJTDLSRD10.870.860.890.890.93D20.790.790.820.810.87D30.690.700.720.730.80D40.690.680.720.750.79D50.820.810.830.840.88D60.720.720.750.770.80D70.680.710.750.750.80D80.650.630.670.670.70Through the above experimental results, it can be found that the classification performance of all nontransfer learning algorithms under noisy conditions decreases more. The reason is that they cannot obtain useful knowledge from noisy data (source domain) for classification. However, all the algorithms in Table7 can transfer some useful knowledge from the source domain for classification in the target domain, so their performance is better than the results in Table 6.In summary, the TDLSR algorithm introduced in the paper is superior to the other algorithms in the detection of epilepsy EEG signals. And, it is easy to learn and train, has high stability, and shows certain advantages compared with other intelligent algorithms.


## 5. Conclusion

To solve the problem of serious shortage of training data in the current scene and improve the accuracy of classification, a novel DLSR-based inductive transfer learning algorithm (TDLSR) was introduced for the detection of epilepsy EEG signals. It can take advantage of both inductive transfer learning and DLSR. On the one hand, it can not only protect the security of the source domain data but also use the data of the target domain and the knowledge of the source domain to get better performance. On the other hand, it inherits the DLSR’s characteristics of being more suitable for real classification scenarios by expanding the interval between different categories. Therefore, compared with DLSR, the new algorithm not only enhances the ability of transfer learning but also ensures that the model is more reasonable. The results reflect that the improved algorithm has more advantages in epilepsy EEG signal classification compared with the traditional algorithms. However, it is found that the results is easily affected by the parameters. In a word, the quality of the parameter selection will directly affect the final detection accuracy. Therefore, to obtain higher detection accuracy, it is worth to further study the characteristics of the EEG signal to guide the setting range of the parameters in the transfer learning algorithm.



---

*Source: 5046315-2020-08-03.xml*