get_spikes_with_history¶
- get_spikes_with_history(neural_data, bins_before, bins_after, bins_current=1)[source][source]¶
Function that creates the covariate matrix of neural activity
- Parameters:
neural_data (
a matrixof size"number of time bins"x"number of neurons") – the number of spikes in each time bin for each neuronbins_before (
integer) – How many bins of neural data prior to the output are used for decodingbins_after (
integer) – How many bins of neural data after the output are used for decodingbins_current (
0or1, optional, default1) – Whether to use the concurrent time bin of neural data for decoding
- Returns:
X (
a matrixof size"number of total time bins"x “number ofsurrounding)time bins used for prediction``” x “:py:class:`number` of ``neurons"– For every time bin, there are the firing rates of all neurons from the specified number of time bins before (and after)