conorjh

Just another WordPress.com site

Archive for the month “January, 2012”

Code for calculating spike metrics

I have started a project on sourceforge

http://sourceforge.net/p/spikemetrics

to store the c++ spike train metric code that was used for the paper with Thomas Kreutz:

On the efficient calculation of van Rossum distances.

The van Rossum metric measures the distance between two spike trains. Measuring a single van Rossum distance between one pair of spike trains is not a computationally expensive task, however, many applications require a matrix of distances between all the spike trains in a set or the calculation of a multi-neuron distance between two populations of spike trains. Moreover, often these calculations need to be repeated for many different parameter values. An algorithm is presented here to render these calculation less computationally expensive, making the complexity linear in the number of spikes rather than quadratic.

The paper is still under review.

Occupy Elsevier!

The mathematician and Fields medal winner Tim Gowers is calling for a boycott of Elservier:

http://gowers.wordpress.com/2012/01/21/elsevier-my-part-in-its-downfall/

and there is a web site

http://thecostofknowledge.com

to sign up, as you should! One question though: should Springer be boycotted too?

Talk in Galway: variations in spike times.

Slides: pdf.

I spoke to Mathematics in NUI Galway on the 19 January 2012 about variation in spike times. It was a great seminar in that most of the department seems to have turned up, I love departments that have a tradition where everyone goes to the main departmental seminar even if the field is very different from their own. The questions were very good too; there was a discussion of the algorithm for calculating the Victor-Purpura metric, there was a suggestion of a method which was linear in the number of spikes, rather than quadratic (*). Another question asked whether the algorithm had been tested by putting jitter in artificially to a single spike train and then testing to see if the artificial jitter could be recovered. I answered that there is no good model for adding noise to a spike train, in fact, that’s something we are thinking about; but it is likely we will be asked to do something like this by the referees for the paper.

Of course, Galway is my alma mater, which made the talk extra fun.

(*) The idea is that you would choose one spike train and look at spikes from the other were within 2/q of it, with some protocol based on proximity for decided which spikes to pair up if this was ambiguous.

Zebra Finch song.

Most of the data I use is recorded from the neurons in Zebra finch, an Australian song bird often used as a model animal for learning. The particular value of using song bird in studying primary processing of sensory information is that a corpus of songs from the same species is considered a good proxy for the natural acoustic environment. It is important to use natural stimuli, neuronal processing is likely to be tuned to natural stimuli and processing is likely to exploit the statistical structure of the environment. However, what is meant by natural is hard to define, we get away with not thinking about this by pretending a collection of bird songs will do, this isn’t proved, but it is plausible.

Anyway, above is a recording of a Zebra finch singing, first a series of squawks, announcing the song, then the song itself.

The sliding crow.

Here is a nice post about the sliding crow video on youtube

http://www.theatlantic.com/technology/archive/2012/01/science-can-neither-explain-nor-deny-the-awesomeness-of-this-sledding-crow/251395/

It sums up my view; it is hard not to see this as an amazing example of tool use and possibly play by the crow, the crows behavior seems very deliberate. If it isn’t playing perhaps it means to scrap the snow, it is however possible that it is just pecking at the object and doesn’t mean to slide, from this one short video it is impossible to know for sure.

Dev-C++ is back!

I am about to start teaching C++ again so I need an IDE to recommend to students using windows, I was pleased to see Dev-C++ has been updated again at last!

http://sourceforge.net/projects/orwelldevcpp/

Merging files in emacs

I used the emacs merge function for, weirdly, the first time today. It is fabulous. You start it by typing

M-x emerge-files

and it prompts for the two file names, it afterwards refers to these as A and B. It gives a split window with the two parent files on the top and the merged file at the bottom. The merged file is initially equal to A. You move from difference to difference using

C-c C-c n for forward and C-c C-c p for back.

The difference is marked out in all three windows and you type

C-c C-c b

to change to the B version, or

C-c C-c a

to go back to the A version. If you want to make further changes you need to enter edit mode, using

C-c C-c e

The buffer containing the merged file can be saved in the usual way. The only thing I disliked about it was that the keystrokes, with their C-c C-c prefixes, were longer than need be.

Talk to TCIN: variations in spike times.

Slides: pdf and tar.gz

These are the slides for the talk about the variation in spike times I gave in TCIN, Trinity College Dublin on the 9 January 2012. The main discussion afterwards related to the rapidity of responses: if the brain can respond so quickly to, for example, visual stimuli, doesn’t that indicate that information is coded in the latency to first spike? Perhaps information is coded in spikes and the role of the spike train is plasticity?

gcc optimizations.

Today I spent trying to compare how fast different algorithms for calculating the van Rossum metric run; I ran sample code compiled using the -O3 flag in gcc. I have never known how these optimization settings work, but today I was profiling the code using gprof and was amazed to see how in-line the code is when optimized, the length of the gprof output is determined in part by how many function calls there are, the output is 163 lines with -O3 and 1042 without.

Post Navigation