PySpike icon indicating copy to clipboard operation
PySpike copied to clipboard

Spike Sync matrix not symmteric

Open ImmanuelSamuel opened this issue 9 years ago • 14 comments

I see that the Spike Sync matrix is unsymmetric sometimes. What is this supposed to mean?

ImmanuelSamuel avatar Aug 13 '15 14:08 ImmanuelSamuel

The matrix should always be symmetric, can you provide an example where it isn't?

mariomulansky avatar Aug 13 '15 15:08 mariomulansky

Ok I figured it out. In one of my conditions since there are no spikes the matrix has 'nan' values.

ImmanuelSamuel avatar Aug 13 '15 15:08 ImmanuelSamuel

Ah OK, I see. However, since the latest version, PySpike should also be able to handle empty spike trains without creating NaNs. See e.g.: a35402c208bd0ad31e5e60b6ddc55a3470e7bdde Do you work with PySpike 0.3? If yes and you still get NaN please provide me an example.

mariomulansky avatar Aug 13 '15 15:08 mariomulansky

Hmm interesting. I just downloaded PySpike this week. So there is definitely something going on. Will try to look into this.

ImmanuelSamuel avatar Aug 13 '15 16:08 ImmanuelSamuel

Yes I am using 0.3. For now please let me know if I need to set the NaNs to 0 or 1 according to the paper. I will try to get an example later.

ImmanuelSamuel avatar Aug 13 '15 17:08 ImmanuelSamuel

For two empty spike trains you should get 1.

mariomulansky avatar Aug 14 '15 09:08 mariomulansky

Is the interpretation valid? Is it right to say that two neurons not firing are synchronized?

ImmanuelSamuel avatar Aug 15 '15 00:08 ImmanuelSamuel

It is definitely arguable. After some discussion we arrived at this interpretation, with the main argument being that also the absence of spikes contains information. However, if this interferes with your analysis we can try to make another interpretation available.

mariomulansky avatar Aug 15 '15 10:08 mariomulansky

I might have found the problem. It appears when providing some interval to the spike_sync_matrix function. I've committed a fix to develop 0d7255c

mariomulansky avatar Aug 17 '15 13:08 mariomulansky

That is great! Also I just want to confirm that the max_tau is in seconds correct? So a max_tau of 5 ms should be written as max_tau=0.005

ImmanuelSamuel avatar Aug 19 '15 18:08 ImmanuelSamuel

PySpike doesnt use dimensions. So max_tau should be given in the same dimension as the times in your spike trains.

To confirm: Did you try if the fix works for you? Then I would close this issue.

mariomulansky avatar Aug 19 '15 18:08 mariomulansky

I haven't. I installed using pip install and so cant do a git pull and try it out at the moment. I have a deadline to meet soon. Will update once it is done.

ImmanuelSamuel avatar Aug 19 '15 19:08 ImmanuelSamuel

Nope I still get NaNs. Its not a big deal for me I just set it to 1.

ImmanuelSamuel avatar Nov 21 '15 18:11 ImmanuelSamuel

Hrm ok, are you using the latest version from Github? Can you provide an example so I can check into this?

mariomulansky avatar Nov 21 '15 22:11 mariomulansky

We checked this with the latest version of PySpike and this issue has been resolved. This includes the case of empty spikes or spike trains with just one spike (see also the closed issue #29). We also double-checked that it works when providing some interval to the spike_sync_matrix function.

thomaskreuz avatar Jan 02 '23 17:01 thomaskreuz