Statistics of spike trains

Statistical measures of spike trains (e.g., Fano factor) and functions to estimate firing rates.

Rate estimation

mean_firing_rate(spiketrain[, t_start, ...]) Return the firing rate of the spike train.
instantaneous_rate(spiketrains, sampling_period) Estimates instantaneous firing rate by kernel convolution.
time_histogram(spiketrains, bin_size[, ...]) Time Histogram of a list of neo.SpikeTrain objects.
optimal_kernel_bandwidth(spiketimes[, ...]) Calculates optimal fixed kernel bandwidth [st3], given as the standard deviation sigma.

Spike interval statistics

isi(spiketrain[, axis]) Return an array containing the inter-spike intervals of the spike train.
cv(a[, axis, nan_policy]) Compute the coefficient of variation.
cv2(time_intervals[, with_nan]) Calculate the measure of Cv2 for a sequence of time intervals between events [st2].
lv(time_intervals[, with_nan]) Calculate the measure of local variation Lv for a sequence of time intervals between events [st4].
lvr(time_intervals[, R, with_nan]) Calculate the measure of revised local variation LvR for a sequence of time intervals between events [st5].

Statistics across spike trains

fanofactor(spiketrains[, warn_tolerance]) Evaluates the empirical Fano factor F of the spike counts of a list of neo.SpikeTrain objects.
complexity_pdf(spiketrains, bin_size) Complexity Distribution of a list of neo.SpikeTrain objects [st1].
Complexity(spiketrains[, sampling_rate, ...]) Class for complexity distribution (i.e.


View tutorial

Run tutorial interactively:


[st1]Sonja Grün, Moshe Abeles, and Markus Diesmann. Impact of higher-order correlations on coincidence distributions of massively parallel data. In International School on Neural Networks, Initiated by IIASS and EMFCSC, volume 5286, 96–114. Springer, 2007.
[st2]Gary R Holt, William R Softky, Christof Koch, and Rodney J Douglas. Comparison of discharge variability in vitro and in vivo in cat visual cortex neurons. Journal of neurophysiology, 75(5):1806–1814, 1996.
[st3]Hideaki Shimazaki and Shigeru Shinomoto. Kernel bandwidth optimization in spike rate estimation. Journal of computational neuroscience, 29(1-2):171–182, 2010.
[st4]Shigeru Shinomoto, Keisetsu Shima, and Jun Tanji. Differences in spiking patterns among cortical neurons. Neural computation, 15(12):2823–2842, 2003.
[st5]Shigeru Shinomoto, Hideaki Kim, Takeaki Shimokawa, Nanae Matsuno, Shintaro Funahashi, Keisetsu Shima, Ichiro Fujita, Hiroshi Tamura, Taijiro Doi, Kenji Kawano, and others. Relating neuronal firing patterns to functional differentiation of cerebral cortex. PLoS Comput Biol, 5(7):e1000433, 2009.