Farid's final project for Exploring Neural Data, Brown U., Coursera

© All Rights Reserved

43 vues

Farid's final project for Exploring Neural Data, Brown U., Coursera

© All Rights Reserved

- Data Mining Assignment
- SWENG545 Kraus Luttrell Term Project
- Pdcs09 Wagner Weirong
- Decision Trees
- Machine Learning Introduction
- IJCSN-2012-1-6-21
- id3-c45
- decision tree 1.pdf
- Decision Tree
- Je 3216281633
- Learning From Imbalanced Data
- Colloquium Presentation
- Report.pdf
- 5] ICADET 035
- BPM-14-04 decision support system.pdf
- [IJCST-V4I6P5]:Rajiv Senapati, D. Anil Kumar
- TLearning Survey
- International Journal of Data Mining & Knowledge Management Process (IJDKP)
- Civil Engineering and Urban Planning: An International Journal (CiVEJ )
- IJETR021637

Vous êtes sur la page 1sur 9

populations to aid position detection (by Farid Pashtoon)

In this paper we will examine whether temporal diversity can be utilized in algorithms to

increase performance of the position detection of a monkeys arm traversing a motion

while recording spikes from the primary motor cortex, possibly applicable to brain

machine interfaces.

Neural spikes were recorded from a monkey using a chronically implanted multi-electrode (96

channel Utah array). During the recording the monkey performed a center-out reach task that

consisted of three phases for each trial. In he first phase, center acquired, the monkey had to

hold its hand at the center of the screen and wait for the onset of a target. The target would

appear only in one of eight directions, namely 0, 45, 90, 135, 180, 225, 270, or 315 degrees. In

the second phase, go cue onset, the monkey would start the motion of its arm. The third phase,

target acquired, is considered to be the traversal of the motion of the monkeys arm in the prior

phase to reaching the target position that was presented. The times were recorded of the go cue

onset, the start of the movement, and the completion of the movement. To visualize the

Figure 1. The process of the cue-reaching task as described by (Rao & Donoghue, 2013). In this figure the target

position is purple when not acquired and changes to yellow when the monkey acquires the target.

The following table describes the relevant data that is used in this paper from Dr. Donoghues

research group at Brown University in Exploring Neural Data.

Name

Description

trial_angle

The direction of movement in the eight directions, 0, 45, 90, 135, 180, 225, 270, or 315.

Each trial consists of only one angle direction.

trial_go

trial_move

Time the monkey began the start of the movement for the trial.

trial_acq

Time the money reached the target location to complete the movement for the trial.

spk_times

List of arrays of spike times for each neuron that was sampled for the trial.

In this paper we will be concerned only with the start of the movement of the monkey until it

reached the target location. The entire extent of the motion will be considered while the traversal

movement was being recorded and the arm was moving. This extent will allow us to analyze

temporal activity because the motion is occurring over a time interval. But before delving into

the temporal activity let gain some intuition about the activity in the 62 neuron population using

simple averaging statistics and scientific visualizations.

STATIC TIME INTERVAL AVERAGING

neuron firing rates of the 62 neurons over the

136 trials that were performed. This is a good

starting point to start Exploring Neural Data.

Each trial has an arbitrary angle assigned for

the motion. They do not occur consecutively.

The first three trials for example have targets

Figure 2. Average neuron firing rates during the

of 270, 135 and 315 degrees in the dataset.

arm sweep from starting the moving to reaching the

Despite this composition, we certainly can see a

target.

great deal of regularity in the image. There looks

to be good activity in the population firings for neurons 0 to10 and the streak above neuron 50. It

is critical to reiterate that the averaging calculations were performed during the entire sweep of

the arm movement from the start of the move to

reaching the target.

Its time to add color into the organization. Color

can reveal important changes in magnitude in

the data set. Additionally we havent yet

average firing rates.

(spikes/sec)

firing rates.

rates. Figures 3 and 4 should add that

additional component of insight. We

clearly see that neurons 0 to 10 and

around 50 have a greater average firing

rate. 30-40 spikes/sec would be a good

number to attribute to the highest

spiking neurons, on average.

We continue to have much chaos in the plots in the previous page to make sense of the neuron

population.. 17 trials were run for each of the angles. However the trials that are being plotted

have arbitrary position angle targets. For each angle the plots will be modified to place the angles

consecutively to see if we find any visual patterns. Lets get started on this step of the analysis.

firing rates in figure 1.

to those shown in figure 5.

Figure 5 is the same plot as in figure 1 but a color map has been applied. Next to it is figure 6.

The differences between the two plots is that figure 6 has all of the angle trials sorted so that the

17 consecutive trials related to any individual angle are plotted adjacent to one another. The first

17 vertical cross sections are all the neuron firing for angle 0. To see this pattern better, figure 7

shows the strips for each of the angles for comparison to each other. Each of these subplots in

figure 7 show their own

local colors. So the

coloring has changed and

0

more patterns have

45

emerged. The reader can

view the plot to look for

90

unique patterns to identify

135

each of the angles. One

example, Between neurons

180

24-28, at angle 315 a green

225

rectangle is identifiable that

is unique to this angle

270

alone!

315

subplots to identify each angle separately.

It is clear from this that patterns emerge that are attributable to set of neurons that are unique to

each angle. However we could question, is this robust? How does it change over time? Will the

same neurons function the same way if the monkey has gone to sleep and the same test applied

one week later? What would happen if the implant were to shift slightly in the brain of the

primate, would not this mechanism of estimating angles from neuron activity fail?

ADD IN TEMPORAL DIVERSITY TO THE MIX

Lets investigate adding changes in firing rate that the neurons undergo from the time the

monkey started the motion to reaching the target. Can we add time as another dimension so that

we can treat the entire neural population (62 in our case), as a whole cluster. This would allow us

to divert from the idea of investigating individual or small set of neurons in trying to generate the

angle estimates. The goal here is to use the entire population of 62 neurons.

To perform this analysis we will develop a discrete time shifted bin based algorithm that sweeps

time and performs

moving average calculations on

all 62 neurons spike

time series. The calculations

were performed on

100ms to the right and 100ms to

the left of the time

centered point for a total of

200ms. Then the

time centered point was shifted

by 10ms and the average taken across the 200ms extent. As these calculations were performed

they were appended to a list and converted to a numpy array to generate a time histogram vector.

Lets take a look at some of these time histograms.

firing rate of individual neurons plotted with their

time histograms across the movement.

calculated and stored in vectors for

one trial (a single angle motion) are

all plotted in Figure 8. These time

shifted bin based averaging

calculations in time reveal that the

firing rates can range anywhere from

0 to 70 spikes/sec. (This compares

well with 30-40 spikes/sec average

we calculated in the static time

interval section). The neurons all start

with a good deal activity because we

are considering the time from the start

of the motion, not the center acquired

phase mentioned on the first page. So

we would expect that firings have started. After the

target has been reached, the firing decay. Also lets

note that the zeros at the end of the waveforms

was zero padding applied to make all trials equal length so the data could be stored in a uniform

matrix structure.

rates plotted individually per neuron

in separate plane.

data as figure 8, but the data

has been plotted in individual

planes per neuron for better

identification and

visualization.

Figure 10. The figure also reflects time revolution. For each neuron the change in firing rate has been

plotted. The legend for this plot would be time intervals. What was the firing rate of a particular neuron as

it evolved in time for the movement of a single trial, a single angle reach.

Figure 10 is the key to answering the question this paper addresses. Can neural firings in the

primary motor cortex be used to estimate the angle of reach of a limb in a primate? This

plot is similar to a plot we generated in figure 7. In that figure we partitioned average neural

activity separately to search for patterns that we unique. In Figure 10 we are doing the a similar

construction. We have partitioned temporal variations into angles to search for patterns. Visually

examining the figure the reader can find generalizations that appear for each angle that might

allow for unique identification.

TIME EVOLVED PATTERN RECOGNITION USING MACHINE LEARNING

The motivation for using a machine learning algorithm to search for patterns in the time evolving

patterns in Figure 10 is that the problem is difficult. The combinatorics of the problem are:

Number of angles = 8

Number of trials per angle = 17

Number of total trials = 136 (ie 8*17)

Number of neurons = 62

Number of time histograms = 4832 (ie 8*17*62)

Time extent per neuron = 500ms to 1000ms

To create an algorithm to handle these difficult combinatorics and correlations in the data would

be a very time consuming task. Additionally we only have 136 trials of limited data to generalize

from. To make life easy for us, machine learning is a useful technique.

is the Bagged Decision Tree in Matlab. To

prepare the data we will use character recognition

of numerical digits first into the Matlab algorithm

so we understand the functions involved and the

types of data the functions expect. In this type of

a data set the images are 16x16 two dimensional

arrays. However the Matlab fitensemble function

expects the data to be in a row vector for each of

the classifications. So the data in this image is

reshaped to a 256 length row vector. A matrix of

Figure 11. Numerical character digits.

row vectors would be created with all of the trials,

which in this case was 10,000 for training the bagged

decision tree classifier. In addition all of the rows have

know classifications which in this were the numerical digits {0,1,2,3,4,5,6,7,8,9}.

Knowing how the bagged decision tree algorithm expected the data, our time evolving histogram

trains will be partitioned similarly into the algorithm. Labels are created for all 136 trials, namely

{0,45,90,135,180,225,270,315} angles. This is the label matrix of all the trials. The data matrix

that we construct will be the time evolved histogram vector for all 62 neurons. Just as in the

character recognition problem these will be row matrices. The time histograms of all of the

neurons were concatenated in a single row per trial. So we had 136 rows of all of the time

histograms of all the neurons as the data set into the learning algorithm. The neuron classification

problem was turned into a 2 dimensional problem, just as the image recognition problem was a 2

dimensional problem.

The steps in Matlab to use the Bagged Decision Tree algorithm are as follows.

1. Partition the set into a data matrix X and a classification matrix y. This was described above.

2. Randomly partition the data into training and validation sets.

cv = cvpartition(y, 'holdout', .5);

% training set

Xtrain = X(cv.training,:);

Ytrain = y(cv.training,1);

% test set

Xtest = X(cv.test,:);

Ytest = y(cv.test,1);

3. Train and predict using bagged decision trees.

mdl = fitensemble(Xtrain,Ytrain,'bag',200,'tree','type','Classification');

ypred_bag = predict(mdl,Xtest);

Confmat_bag = confusionmat(Ytest,ypred_bag);

Those are the complete set of steps to use the function. The key is getting the data into a correct

form and understanding the context of the classification problem, as we have learned in the

paper.

Figure 12 shows the that the

performance of the bagged decision

classifier did indeed converge by

exponentially decaying. Utilizing

temporal evolution on the entire

population of 62 neurons without

throwing any out of the mixture to

estimate angles was successful.

The accuracy of the angle estimates

using this approach achieved 84%

correct decisions of angles.

for the neuron trial position estimates using time evolution

from start of movement to reaching target.

Some interesting programming tricks have been discussed already in the paper.

1. The discrete time shifting bin algorithm has been discussed.

2. Creating data in uniform matrices that could be stored in matlab data files has been discussed.

3. Calling the Bagged Decision Tree algorithm in Matlab and the procedure for doing can be

referred to above.

4. The transformation of Python data structures is described in the next section.

PROBLEMS ENCOUNTERED

The main problem that was encountered was how to manage the data and all of the calculations

and store them in python data structures that were used to create the plots for this paper.

Additionally the storage of this data had to be preserved to eventually store to files for use in

matlab.

This problem was solved by creating a side dictionary database that mapped the original data set

provided by Dr. Donoghues to one that indexed all of the data on a trial basis. The original data

set stored all the data arrays. The transformed database dictionary that was created to code this

project created an array of dictionaries per trial.

For example to access the trial_go time for trial 0, the following syntax could be used,

trials_database_vec[0]['go']. To access all of the time histograms, the follownig command is

issued, trials_database_vec[trials_0_indices[0]]['neurons_time_histograms_vec']. This last

example allowed the plotting of Figure 10 in one single command, rather that iterating for each

plot.

FOLLOW UP ANALYSIS

Currently the approach used in this paper can achieve an 84% correct decision accuracy of

angles. Can this performance be improved? Because data from all 62 neurons in the population

are used, mainly to examine the temporal diversity question, can some of these neurons be

dropped from the set? Will that improve performance because they are acting as noise sources

into the classification algorithm. One proposal to making the data set more sparse prior to

running the machine learning algorithm is to rank the neurons with the highest average firing

rates. Choose the top 23, for example, and throw away the data from all the other lower firing

rate neurons.

Also given that we had performed population averaging analysis, could a hybrid approach be

created. We analyzed both the temporal data histograms and on the patterns we discussed using

average firing rates. In both cases visual patterns developed from which we gained insight.

Would it be possible to run both data sets into either combined or parallel classifiers to increase

the performance of detecting the target angles.

BIBLIOGRAPHY

1. Rao, N. G., & Donoghue, J. P. (2014). Cue to action processing in motor cortex populations.

Journal of Neurophysiology, 111(2), 44153. doi:10.1152/jn.00274.2013, Brown University

2. Prof. Mark Churchland, Columbia University

http://thesciencenetwork.org/programs/tdlc-all-hands-meeting-2013/the-neural-dynamics-ofmovement-generation

- Data Mining AssignmentTransféré parJackXu
- SWENG545 Kraus Luttrell Term ProjectTransféré parKaren Kraus
- Pdcs09 Wagner WeirongTransféré parMike Warner
- Decision TreesTransféré parMahendra Babu
- Machine Learning IntroductionTransféré parAlex David
- IJCSN-2012-1-6-21Transféré parijcsn
- id3-c45Transféré parPawan Choure
- decision tree 1.pdfTransféré parCART11
- Decision TreeTransféré parMıghty Itauma
- Learning From Imbalanced DataTransféré parMun Kiat
- Colloquium PresentationTransféré parAnkit Gupta
- Je 3216281633Transféré parAnonymous 7VPPkWS8O
- Report.pdfTransféré parGökhan Kof
- 5] ICADET 035Transféré parAlok Jha
- BPM-14-04 decision support system.pdfTransféré parkam_anw
- [IJCST-V4I6P5]:Rajiv Senapati, D. Anil KumarTransféré parEighthSenseGroup
- TLearning SurveyTransféré parazertytyty000
- International Journal of Data Mining & Knowledge Management Process (IJDKP)Transféré parLewis Torres
- Civil Engineering and Urban Planning: An International Journal (CiVEJ )Transféré parMatthew Johnson
- IJETR021637Transféré parerpublication
- journal 1Transféré parKokoHendriawan
- INCREASED PREDICTION ACCURACY IN THE GAME OF CRICKETUSING MACHINE LEARNINGTransféré parLewis Torres
- Classification of Radar Returns from Ionosphere Using NB-Tree and CFSTransféré parEditor IJTSRD
- Margin of SafetyTransféré paramirge
- 4-1 dwdm16-17Transféré parFaisal Ahmad
- c5.0-3Transféré parNada Mufidah
- DM Data MiningTransféré parteddy demissie
- _5f6530087fcb6e7c03d5925fcee9c692_logistic-regression-model-annotated.pdfTransféré parKingSlayer001
- Unsupervised Taxonomy of Sound EffectsTransféré parsaif alam
- Spatial Decision TreeTransféré parAndhy

- 1882 Lecture by William George LemonTransféré parTim Lemon
- SM Stats - Sandnabba, Santtila, Alison,Transféré parscottpetrie
- Aditya Hriday StotramTransféré parRitwik Yogi
- DAYS OF ELIJAH.docxTransféré parteyang
- The Different Modes of ExistenceTransféré parIvan Flores Arancibia
- Incarnation and the Holy TrinityTransféré parakimel
- capfinalTransféré parapi-267074391
- Factors Affecting Job Performance A Review of Literature.pdfTransféré parYamany Yusda Fujiwara
- The Important Aspects of Teaching Chess - Tatyana OgnevaTransféré parNicolas Riquelme Abuffon
- Governance Theory and Practice a Cross Disciplinary ApproachTransféré parPatricia
- 296.MultistageSamplingTransféré parkenanga766
- The UpanishadsTransféré parvinay
- HuanLing_part1Transféré parsuzuki50
- Land Reform and Agrarian Change in India and Pakistan Since 1947 ITransféré parUsman Ahmad
- A Comparative Study of Educational Leadership Development and Qualifications in the Czech Republic and EnglandTransféré parVictor Manuel Enriquez G
- team evaluation sheetTransféré parapi-401761289
- The Journey to the East by Hermann Hesse - The Tao of HesseTransféré parWilson Lloyd Estero
- the great gatsbyTransféré parapi-439486896
- Classroom Management HandoutsTransféré parAbbas Jafri
- Handbook of Abhidhamma Studies IITransféré parabhidhamma
- wengerangroupassignmentTransféré parapi-272637257
- observation-reflection form lesson 1 ela 1Transféré parapi-317362905
- behavioralquestionsTransféré parAnkit Thakkar
- IBPS Clerks Modelpaer 1Transféré parAnil Kumar
- Leadership Styles Versus MotivationTransféré parJoshua Ordinario
- Ten Powerful Phrases for Positive PeopleTransféré parpohguat81
- Amaze Every Customer WorkbookTransféré pargailstam
- Ali, Dr_ Allawi, A - The Crisis of Islamic Civilization (2009)-1.epubTransféré parΑντώνης Χρυσόπουλος
- GMATTransféré parmpariksheet
- Eid Milad Un NabiTransféré parMona Ali