Добавил:
kiopkiopkiop18@yandex.ru t.me/Prokururor I Вовсе не секретарь, но почту проверяю Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Ординатура / Хирургия / Библиотека им академика М.И. Перельмана / Книга_5276_Библиотеки_им_академика_М_И_Перельмана

.pdf
Скачиваний:
0
Добавлен:
12.10.2026
Размер:
4 Мб
Скачать
☆
43
Figure 3.3 shows the performance of FastICA algorithm when applied to a simulation
example. Five different simulated sources; three sine waves at different frequencies with some
phase shifts with some sources, square wave and sawtooth wave were mixed with some miximg
matrix and then applied tho the FastICA algorithm. The resultant components were as shown in
the figure below.
(a) (b)
(c)
Figure 3.3: FastICA algorithm test example: a) The five original different sources; three sine waves at
different frequencies with some phase shifts with some sources, square wave and sawtooth wave; b) The
sources were mixed with some mixing matrix; c) The resultant components from FastICA algorithm.
0 100 200 300 400 500 600 700 800 900 1000
-1
0
1
0 100 200 300 400 500 600 700 800 900 1000
-1
0
1
0 100 200 300 400 500 600 700 800 900 1000
-1
0
1
0 100 200 300 400 500 600 700 800 900 1000
-1
0
1
0 100 200 300 400 500 600 700 800 900 1000
-1
0
1
Time (msec)
0 100 200 300 400 500 600 700 800 900 1000
-20
0
20
0 100 200 300 400 500 600 700 800 900 1000
-20
0
20
0 100 200 300 400 500 600 700 800 900 1000
-10
0
10
0 100 200 300 400 500 600 700 800 900 1000
-10
0
10
0 100 200 300 400 500 600 700 800 900 1000
-20
0
20
Time (msec)
0 100 200 300 400 500 600 700 800 900 1000
-1
0
1
0 100 200 300 400 500 600 700 800 900 1000
-1
0
1
0 100 200 300 400 500 600 700 800 900 1000
-1
0
1
0 100 200 300 400 500 600 700 800 900 1000
-1
0
1
0 100 200 300 400 500 600 700 800 900 1000
-1
0
1
Time (msec)
44
3.3 Feature Extraction
In Chapter 2 we have discussed some paradigms that let users control their brain activity and the
neurophysiological signals corresponding to the respective paradigms. To allow actual control of
a BCI, the neurophysiological signals have to be mapped to values that allow discrimination of
different classes of signals, i.e. the neurophysiological signals have to be detected.
The first step underlying most methods for classification of neurophysiological signals is
to capture or record labeled training data. Acquiring labeled training data means that the subject
has to perform prescribed actions, while EEG signals are recorded. Then, a computer is used to
learn the desired mapping between signals and classes.
After the data acquisition and data processing phases, machine learning algorithms are
applied to infer functions that can be used to classify neurophysiological signals. Some studies
divide machine learning algorithms into two modules: feature extraction and classification, while
others (as in this study) consider feature extraction as a part of the pre-processing step. However,
the feature extraction module serves to transform neurophysiological signals into a representation
that makes classification easy. In other words, the goal of feature extraction is to remove other
unnecessary information or data from the input signals, while at the same time retaining
information that is important to discriminate different classes of signals. Another goal of feature
extraction is to reduce the dimensionality of the data that needed to be classified. After feature
extraction, machine learning algorithms are used to solve two tasks. During training, the task is to
infer a mapping between signals and classes. For this, the labeled feature vectors produced by the
feature extraction module are used. During application of a BCI, the task is to discriminate
different types of neurophysiological signals and hence to allow for control of a BCI.
In this section we only review some methods for feature extraction in BCIs in general.
Machine learning algorithms are described in the next section.
45
To achieve the goals of features extraction, a priori knowledge about the characteristics
of the neurophysiological signals in the temporal, the frequency, and the spatial domain is used.
Depending on the type of signal to be classified, this knowledge can take many different forms.
Consequently many different feature extraction methods have been described. Some of the basic
and often used methods are described below.
3.3.1 Time Domain Features
Time domain features are related to changes in the amplitude of neurophysiological signals,
occurring time-locked to the presentation of stimuli or time-locked to actions of the user of a BCI
system. Good example for signals that can be characterized with the help of time domain features
is the P300. A strategy that is often used to separate this signal from background activity and
noise is low-pass or band-pass filtering the recorded EEG signals, optionally followed by down-
sampling. This strategy is reasonable because most of the energy of the P300 is concentrated at
low frequencies. Therefore, low-pass filtering, together with down-sampling allows to remove
unimportant information from high frequency bands. Additionally, the dimensions of the signals
are reduced. Examples for systems in which filtering and down-sampling have been employed are
the P300 BCI described in [74], and algorithm applied by [6] to BCI competition III, 2004.
Using signal’s time domain, some morphological features can be extracted and may be
used alone as distinct features or in addition to other features. Some of these morphological
features are listed below [61]:
Latency (LAT,

): the ERP’s latency time, i.e. the time where the maximum signal value
appears:

󰇝󰇛󰇜

󰇞 (6)
Where s(t) is the ERP single trial during session time after stimulus (button flashing) and

is the maximum signal value in this time interval.
Amplitude (AMP,

): the maximum signal value:
46

 
󰇝
󰇛
󰇜󰇞
(7)
Latency/amplitude ratio: LAR =



Absolute amplitude: AAMP = |

|
Absolute latency/amplitude ratio: ALAR = |



|
Positive area (PAR, Ap): the sum of the positive signal values:
 
󰇛󰇛󰇜󰇛󰇜󰇜


(8)
Negative area (NAR, An): the sum of the negative signal values:
 
󰇛󰇛󰇜󰇛󰇜󰇜


(9)
Peak-to-peak (PP, pp):
  

 

(10)
Where

and

are the maximum and the minimum signal values, respectively:
Peak-to-peak time window (PPT, tpp):
 

 

(11)
Wavelet transform of the signals can be used as an alternative to filtering. Discrete
wavelet transform (DWT) is described here in some details while continuous wavelet transform
(CWT) have been described in some other studies in the literature. An important step in systems
using wavelets is to select a subset of wavelet coefficients that is suitable for classification. This
is equivalent to selecting regions in the time-frequency plane at which signals can be classified
with high accuracy and can be achieved with the help of feature selection algorithms. Examples
for the use of the DWT are the P300-based BCI systems described in [23, 28, and 40]. In [23 and
47
40], Daubechies wavelets were used for feature extraction. An example for the use of the CWT is
the algorithm described in [72 and 81].
Discrete Wavelet Transformation
The Discrete Wavelet Transformation (DWT) is a transformation that can be used to analyze the
temporal and spectral properties of non-stationary signals. The DWT is defined by the following
equation [50]:
󰇛

󰇜
 
󰇛
󰇜

 󰇛

  󰇜
(12)
The set of functions

󰇛󰇜 is referred to as the family of wavelets derived from (n),
which is a time function with finite energy and fast decay called the mother wavelet. The basis of
the wavelet space corresponds then, to the orthonormal functions obtained from the mother
wavelet after scale and translation operations. The definition indicates the projection of the input
signal into the wavelet space through the inner product, then, the function f(x) can be represented
in the form:
󰇛
󰇜
󰇛󰇜

(13)
Where d
j
(k) are the wavelet coefficients at level j. The coefficients at different levels can be
obtained through the projection of the signal into the wavelets family as:
 

󰇛 

󰇜
(14)
 

󰇛

󰇜
(15)
The DWT analysis can be performed using a fast, pyramidal algorithm described in terms
of multi-rate filter banks. The DWT can be viewed as a filter bank with octave spacing between
filters. Each sub-band contains approximately half the samples of the neighboring higher
48
frequency sub-band. In the pyramidal algorithm the signal is analyzed at different frequency
bands with different resolution by decomposing the signal into a coarse approximation and detail
information. The coarse approximation is then further decomposed using the same wavelet
decomposition step. This is achieved by successive high-pass and low-pass filtering of the time
signal, and a down-sampling by two as defined by the following equations [50]:
󰇛
󰇜
󰇛
  
󰇜

󰇛󰇜
(16)
󰇛
󰇜
󰇛
  
󰇜

󰇛󰇜
(17)
Figure 3.4 shows a three-level filter bank. Signals cAi and cDi are known as
approximation and detail coefficients, respectively. This process may be executed iteratively
forming a wavelet decomposition tree up to any desired resolution level.
(a) (b)
Figure 3.4: DWT. a) sub-band coding algorithm of DWT; b) Wavelet function ψ [49]
The frequencies that are most prominent in the original signal will appear as high
amplitudes in that region of the DWT signal that includes those particular frequencies and the
frequency bands that are not very prominent in the original signal will have very low amplitudes,
and that part of the DWT signal can be discarded without any major loss of information, allowing
data dimensions reduction.
EEG
cD1
cA1
cD2
cA2
cD3
cA3
49
3.3.2 Frequency Domain Features
Frequency domain features are related to changes in oscillatory activity. Such changes can be
evoked by presentation of stimuli or by concentration of the user on a specific mental task.
Because the phase of oscillatory activity is usually not time-locked to the presentation of stimuli
or to actions of the user, time domain feature extraction techniques may not be used. Instead,
feature extraction techniques that are invariant to the exact temporal evolution of signals have to
be used.
The most commonly used frequency domain features are related to changes in the
amplitude of oscillatory activity. For example in systems based on motor imagery, the band
power in the mu and beta frequency bands at electrodes located over the sensorimotor cortex is
used as a feature. In the case of SSVEPs, band power in the harmonics of the visual stimulation
frequency at occipital electrodes can be used as a feature. To estimate band power, different
methods have been used [45].
A second type of frequency domain features is related to the synchronization between
signals from different regions of the brain. Synchronization of signals from different brain regions
may indicate that these regions communicate. This permits to discriminate cognitive tasks
involving communication between different regions of the brain.
For the P300 wave, some of its frequency characteristics can be used to detect it. Some of
these features are mode frequency, median frequency and mean frequency as proposed in [82].
The mode frequency is the frequency with the most energy content in the signal spectrum, so the
maximum amplitude in the power spectrum density of the signal is at this frequency. Median
frequency separates the power spectrum into two equal energy areas, while the mean frequency
represents the centroid of the spectrum and is calculated from the weighted averaging of the
frequencies in the power spectral density of the signal [82].
50
3.4 Classification Algorithms
Classification stage is the last stage in the P300 signal detection process in the P300-based BCI
system. Once the data is processed and signal features are extracted, the classifier can accept
these features as inputs and after being trained, it can distinguish whether these features belong to
a target class (P300 exists) or a non-target class (P300 does not exists).
Generally, many classifiers have been used in EEG signals classification. Examples of
these are Multilayer Perceptron Neural Network (MLP NN) with back-propagation as in [28, 34,
and 43], Adaptive Neuro Fuzzy Inference System (ANFIS) as in [40], Support Vector Machine
(SVM) as in [5, 6, 48], Linear Discriminant Analysis (LDA) as in [5, 57, and 79], and Bayesian
Discriminant Analysis (BDA) in [80].
In this section we give details about SVM and MLP neural network classifiers since they
are widely used in the field of BCIs and we decided to use them for the classification step in this
research work.
3.4.1 Neural Network
Generally, NNs are widely used in many applications, especially in pattern recognition and
classification applications. Neural networks have become one of the most efficient methods for
these applications. Since 1950s, several researchers have proposed different algorithms of using
neural networks in pattern recognition problems, and one of the most famous algorithms is back-
propagation (BP) using feed-forward multilayer perceptron neural networks (FFMLP NN) [52].
The internal structure of fully connected FFMLP NN is shown in figure 3.5.
The “fully connected” term means that the output from each input and hidden neuron is
distributed to all of the neurons in the following layer. “Feed forward” means that the values only
move from input to hidden to output layers; no values are fed back to earlier layers (a Recurrent
51
Network allows values to be fed backward) [52]. As seen in the figure below, the general
structure of FFMLP is as follows: layer one just distributes the input data it receives from the
input vector to the hidden layer. The hidden layer consists of a number of nodes or neurons. Each
neuron has its own transfer function (in our project tan sigmoid is used for all neurons) and the
output vector of all neurons is calculated by using the transfer function f(n) as in equation (18).
The output layer sums the output of all neurons after multiplying each neuron output with its
connection weight as in equation (19) and the result will be the output of the network (1 or -1).
 
󰇛
   
󰇜 (18)
 
󰇛
 
 
󰇜 (19)
Figure 3.5: FFMLP NN structure
3.4.2 Support Vector Machines
A support vector machine (SVM) is a large-margin binary classifier. Given a set of training data
from two classes, an SVM will find the hyperplane that separates samples from the two classes
with a maximum margin width. The training set for an SVM consists of paired instances x
i
with a
class label y
i
. A training set containing N instances with f features is represented by 󰇝
󰇛
 
󰇜

𝑎
Output layer
Φ
Φ
Φ
Φ
Φ
𝑤
𝑤
𝑤
𝑤
𝑛
𝑤
+
𝑝
𝑝
𝑝
𝑝
𝑝
𝑛
Hidden layer
Input layer
52

󰇝

󰇞
󰇞

. If the data is linearly separable, the optimization problem can simply be
formulated as:


(20)
 
󰇛 
 󰇜  
with the separating hyperplane designated by      . When an unseen instance x from
the test set is classified, the decision function is 󰇛󰇜     . If f(x) < 0, the instance lies
on one side of the hyperplane and x is classified as belonging to the first class (i.e., y= -1), and if
f(x) > 0, x is in the second class (i.e., y = 1).
If the data is not linearly separable, the formulation can be modified to become a soft-
margin classifier. Misclassifications are now allowed with a given penalty that is regulated by the
penalty parameter C that must be chosen in advance. The optimization problem is now stated as:
 



(21)
 
󰇛
 
 
󰇜
   
 
 
The variable
can be seen as a slack variable. The soft-margin formulation finds a
hyperplane solution that is a trade-off between maximizing the margin and the amount of error
allowed with a given penalty parameter C.
The above formulations, only allow for linear classification, but these can be extended by
applying the kernel trick for nonlinear classification. A data instance x can be mapped into some
higher-dimensional (or even infinite-dimensional) space by a given mapping   󰇛󰇜. If only
the dot product between two instances is needed, which is the case in the SVM formulation, the
kernel trick can be used so that the mapping is never explicitly computed for any instances. A
kernel function
󰇛
 
󰇜
 
󰇛
󰇜
 󰇛
󰇜 is efficiently defined that computes the equivalent of