View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
(El t h l )
Anthony Hampton, Tony Nuth, Miral Patel
(Portions credited to Jack Shelley-Tremblay and E. Keogh)
M th d l
The goal of this project is to evaluate EEG
data from 19 subjects using various
techniques of mathematics
A recording of the electrical waves that sweeps
over the brain’s surface.
It is measured by the electrodes that
is placed on top
of the scalp.
Parts of the brain
We are interested in the Primary Motor Cortex,
and Pre-motor Cortex
Understand the Waves
In neurophysiology, an action potential (also
known as a nerve impulse or spike) is a pulse-
like wave of voltage that travels along several
types of cell membranes.
Event related Potentials
An event-related potential (ERP) is any stereotyped
event- p ( ) y yp
electrophysiological response to an internal or
external stimulus. More simply, it is any measured
brain response that is directly the result of a thought
By collecting multiple trials of the same type of stimuli,
we can enhance the signal and reduce the noise
using simple math(typically neuroscientist use this)
Defined an Epoch
A series of time points locked in a
significant point time. The button press is
our significant point in time
A subject’s data
Example of an
At a different
A time series is a sequence of data
points, measured typically at successive
times spaced at (often uniform) time
What is a time series?
What EM clustering does
How do we classify points and estimate
parameters of the models in a mixture at
the same time?
Adaptive ft l t i
Ad ti soft clustering: EM. D t
points are assigned to each group with a
probability equal t a lik lih d of th t
b bilit l to likelihood f that
point belonging to that group.
What is EM - Expectation
A statistical model that makes use of the
finite Gaussian mixture models.
A set of parameters are recomputed until a
desired value is reached
I iti l variables are randomly i iti li d
i bl d l initialized
The methods of EM
Initialization: Pick start values for
parameters (for us it was making random
models and setting a sigma)
g g )
Iteratively process until parameters
Expectation (E) step: Calculate weights for
every data point and update the weights to
affect further steps
ff t f th t
Maximization (M) step: Maximize a log
likelihood function with the weights given by E
step to update the parameters 16
Initialized 2 models of data using the mean of the EEG
entered using the first half of data over time for the first
model and the second half of over time for the second
Co pa ed each ode and created
Compared eac model a d c eated a weight matrix
e g t at
Normalized the data
OSB : Optimal Subsequence Bijection
It is an algorithm that determines the optimal
subsequence bijection between two sequences of
We were given a code ‘tsDAGjump4’ that worked for
only one channels and we modified so it can work for
more than 1 channels.( works for 40 channels)
Modification: Created difference matrix with each
entry containing differences of corresponding
Why OSB algorithm?
The OSB is efficient because we use DAG(Directed Acyclic
Graph), cheapest path to find the solution.
By using DAG in OSB, we get p
y g , g perfect and correct results on
Time Series dataset.
DAG helps us to get rid of outlier elements and get one-to-one or
onto bijection of a sequences.
Comparing OSB with DTW using warping window OSB shows
that by skipping elements improves results.
Directed Acyclic Graph
This is a simple
example of DAG.
By skipping over
outlier elements we
get perfect result.
This program is used to find:
Ts - Time Series
DAG – Directed Acyclic Graph
OSB between two sequences of real numbers
D is to find distance between two elements.
C is for the jump cost.(penalty for skipping an
W- weight of edges
Fi d subsequences of tf two elements.
Create dissimilarity matrix.
Use shortest path algorithm on Directed Acyclic
Find jump cost.
Fi d j t
Nodes are index pairs of matrix.
The main thing in the algorithm is to find edge
weights of DAG.
“Wavelets are mathematical functions that cut up
data into different frequency components, and
then study each component with a resolution
matched to its scale.”
(IEEE Computational Science and
Engineering, Summer 1995, vol. 2, num. 2,
published b the IEEE Computer Society)
bli h d by h C S i )
Discussion of Results
We used OSB to obtain our results.
Our results consist of two sequences a and b then find
subsequences a’ of a and b’ of b so that a’ matches best
a b a
Results are divided on two parts:
Cluster Precision - means x% of time that you will cluster an epoch
Cluster Recall - means y% of time that you will cluster a known left or
Discussion of Results
typeout1: [75 76 27 21 22] = a
rtypeout1: [77 72 24 22 24] = b
ltypeout2: [25 24 73 79 78] = a’
rtypeout2: [23 28 76 78 76] = b’
For Cluster Precision:
left button cluster: 76, right button cluster: 72 (from a and b)
Formula : 76/ (76+72) = 0 51351351 = 51%
For Cluster Recall:
left button cluster: 76, right button cluster: 28 (from a and b’)
Now we applied the formula so: 76/ (76+28) = 0 73076923 = 73%
Note: Apply same formula to find both right cluster
precision and recall.
We’re given total 19 subjects (EEG Datasets) but we
derived correct result for only 10 subjects.
Other 9 subjects gave us all zeros as a result.
ltypeout1: [0 0 0 0 0]
rtypeout1: [0 0 0 0 0]
ltypeout2: [0 0 0 0 0]
rtypeout2: [0 0 0 0 0]
Yang Ran, Expectation Maximization : An
Approach to Parameter Estimation”,
www umiacs umd edu/~shaohua/enee698
Andrew Blake Bill Freeman “Learning
Blake, Freeman, Learning
and Vision: Generative Methods”-ppt ICCV
2003 October 12 2003