elephant.statistics.sskernel¶
-
elephant.statistics.
sskernel
(spiketimes, tin=None, w=None, bootstrap=False)[source]¶ Calculates optimal fixed kernel bandwidth, given as the standard deviation sigma.
Parameters: - spiketimesnp.ndarray
Sequence of spike times (sorted to be ascending).
- tinnp.ndarray, optional
Time points at which the kernel bandwidth is to be estimated. If None, spiketimes is used. Default: None.
- wnp.ndarray, optional
Vector of kernel bandwidths (standard deviation sigma). If specified, optimal bandwidth is selected from this. If None, w is obtained through a golden-section search on a log-exp scale. Default: None.
- bootstrapbool, optional
If True, calculates the 95% confidence interval using Bootstrap. Default: False.
Returns: - dict
- ‘y’np.ndarray
Estimated density.
- ‘t’np.ndarray
Points at which estimation was computed.
- ‘optw’float
Optimal kernel bandwidth given as standard deviation sigma
- ‘w’np.ndarray
Kernel bandwidths examined (standard deviation sigma).
- ‘C’np.ndarray
Cost functions of w.
- ‘confb95’tuple of np.ndarray
Bootstrap 95% confidence interval: (lower level, upper level). If bootstrap is False, confb95 is None.
- ‘yb’np.ndarray
Bootstrap samples. If bootstrap is False, yb is None.
If no optimal kernel could be found, all entries of the dictionary are set to None.
References
[1] H. Shimazaki, & S. Shinomoto, “Kernel bandwidth optimization in spike rate estimation,” Journal of Computational Neuroscience, vol. 29, no. 1-2, pp. 171-82, 2010. doi:10.1007/s10827-009-0180-4.