Skip to main content
  • Poster presentation
  • Open access
  • Published:

Variable bin size selection for periestimulus time histograms (PSTH) with minimum mean square error criteria

To date the most common method for extracting neuronal responses is by constructing PSTHs that are time locked to task events. Many parameters of interests such as response magnitude, onset and duration are then calculated from the constructed PSTHs. However the precision of PSTH response estimate critically depends on the choice of bin sizes. This dependence demands objective criteria for bin size selection. A seminal study by Shimazaki and Shinomoto [1] derived an optimal cost function for choosing a fixed bin size for a time varying Poisson process. It is easy to see that using a one-size-fit-all recipe for bin sizes will invariably overestimate and underestimate rate changes for fast and slow fluctuations respectively.

Here we extend previous results by calculating the cost function that minimizes mean square error for variable bin sizes with the same assumptions used previously for time varying Poisson processes C o s t ( N , Δ ) = 1 n 2 T i = 1 N 2 k i - ( k i - Δ i k ̄ ) 2 Δ i . To minimize this nonlinear and nonconvex cost function, we utilize an array of methods some of which are widely used for nonlinear optimization, namely: Active set, Simultaneous perturbation stochastic approximation (SPSA), Genetic Algorithm and an approximate heuristic algorithm. Average performance of each algorithm on a typical simulated neuronal firing is calculated using 50 iterations. All methods resulted in a lower cost function compared to fixed bin size as expected. Plotting the final cost vs the algorithm run time shows that the method of 'Active set' overall has the best cost reduction while still being reasonably fast compared to the fixed bin size approach (Figure 1) . Further investigation of the properties of this cost function and developing computationally efficient methods for its minimization will be the basis of future work.

Figure 1
figure 1

Comparing the costs and time efforts of the algorithms.


  1. Shimazaki H, Shinomoto S: A method for selecting the bin size of a time histogram. Neural computation. 2007, 19 (6): 1503-1527.

    Article  PubMed  Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to SM Heidarieh.

Rights and permissions

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. The Creative Commons Public Domain Dedication waiver ( applies to the data made available in this article, unless otherwise stated.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Heidarieh, S., Jahed, M. & Ghazizadeh, A. Variable bin size selection for periestimulus time histograms (PSTH) with minimum mean square error criteria. BMC Neurosci 16 (Suppl 1), P80 (2015).

Download citation

  • Published:

  • DOI: