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 matrix of size "number of time bins" x "number of neurons") – the number of spikes in each time bin for each neuron

  • bins_before (integer) – How many bins of neural data prior to the output are used for decoding

  • bins_after (integer) – How many bins of neural data after the output are used for decoding

  • bins_current (0 or 1, optional, default 1) – Whether to use the concurrent time bin of neural data for decoding

Returns:

  • X (a matrix of size "number of total time bins" x “number of surrounding)

  • 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)