Bookmark and Share

Alex Bäcker's Wiki / Measuring spike timing jitter
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Measuring spike timing jitter

Page history last edited by Alex Backer, Ph.D. 17 years, 1 month ago

I’ve been looking at spike train variability, and I had thought of using median time shifted for all spikes moved using q=0 as a method that is relatively independent of the q parameter to estimate spike timing jitter between spike trains in response to repeated presentations of a stimulus, since the median is not influenced much by the long shifts that make the difference between q=0 and higher q’s. But I realized in testing this that despite the fact that your algorithm is guaranteed to give the lowest cost, for some pairs of spike trains and low q it gives assignments between spikes that are odd, in the sense that instead of shifting one odd spike by a lot and shifting all the others just a bit, it shifts lots of spikes a lot. The overall distance ends the same, but the median shift goes up significantly. Without thinking about this very deeply, it does not seem trivial to “fix” this (i.e. give the set of shifts with lowest median among all giving the same average) without a combinatorial explosion (the very equivalence in distance of those transformations is what allows you to use linear programming and not consider all possible subsets of spikes, I believe), except perhaps to use a higher q and then eliminate the spikes not shifted under the high q –but then that voids my purpose of making the measure q-independent.

 

 

 

I then tried using Gabriel Kreiman’s jitter measure from his J Neurophys 2000 paper. He defines spike jitter as 1/q(1/2), where q(1/2) is the value of q such that the distance between spike trains over the sum of their spike counts is ½. But I found that it’s not always defined. For example, if I have 6 spikes in one train and 20 in the other, the minimum distance with q=0 is 14, which is more than half the sum of the spike counts, thus there is no semipositive q that yields a distance that’s half the sum of the spike counts, and q(1/2) does not exist.

 

 

 

So I made a simple change in it that makes it always defined, and that seems to work. The distance between two spike trains as a function of q does indeed have a maximum in the sum of the number of spikes, but its minimum is not zero, but rather (max(ni,nj)-min(ni,nj)) (ni, nj number of spikes in each train), So if you divide d by (ni+nj)- (max(ni,nj)-min(ni,nj)), and seek the q that makes q be at the midpoint between that minimum and the maximum given by the sum of spike counts, i.e. if you define q(1/2) as the q that makes the cost=min+ ½ (max-min), then it would appear that it’s always defined. The two measures are equivalent in the case of no insertions and deletions.

 

 

 

Gabriel has been kind enough to confirm that the above seems correct to him.

 

 

The MATLAB code for the new measure is below.

 

 

 

function jitter=abjitter(spkt1,spkt2)

 

 

 

n1=length(spkt1);

 

n2=length(spkt2);

 

suma=n1+n2;

 

mini=(max(n1,n2)-min(n1,n2));

 

allowablecostintervaldif=suma-mini;

 

qinterval=0 100; % 1/ms

 

qtest=(qinterval(2)-qinterval(1))/2 + qinterval(1);

 

d=distspike(spkt1,spkt2,qtest);

 

 

 

while d d>mini+.52*allowablecostintervaldif, %dn<.48 dn>.52,

 

if d

qinterval(1)=qtest;

else,

qinterval(2)=qtest;

end

qtest=(qinterval(2)-qinterval(1))/2 + qinterval(1);

d=distspike(spkt1,spkt2,qtest);

 

end

 

 

 

jitter=1/qtest;

 

 

 

 

 

Comments (0)

You don't have permission to comment on this page.