neuroglia.event.PeriEventSpikeSampler

class neuroglia.event.PeriEventSpikeSampler(spikes, sample_times, fillna=True, sampler=None, sampler_kwargs=None)[source]

Take event-aligned samples of spikes from a population of neurons.

Parameters:
  • spikes (pandas DataFrame with columns ['time','neurons']) – The spikes that will be sampled from when the transform method is called
  • sample_times (array) – Time relative to events that will be used to sample or bin spikes.
  • fillna (boolean, optional (default: True)) – Whether to fill unobserved values. This is likely to occur if a given event has no spikes associated with it.
  • sampler (transformer, optional (default: neuroglia.spikes.Binner)) – Binner or Smoother from neuroglia.spikes
  • sampler_kwargs (dict-like) – Dictionary of keyword arguments to pass along to the Sampler

Notes

This estimator is stateless (besides constructor parameters), the fit method does nothing but is useful when used in a pipeline.

__init__(spikes, sample_times, fillna=True, sampler=None, sampler_kwargs=None)[source]

x.__init__(…) initializes x; see help(type(x)) for signature

Methods

__init__(spikes, sample_times[, fillna, …]) x.__init__(…) initializes x; see help(type(x)) for signature
fit(X[, y]) Do nothing and return the estimator unchanged
fit_transform(X[, y]) Fit to data, then transform it.
get_params([deep]) Get parameters for this estimator.
set_params(**params) Set the parameters of this estimator.
transform(X) Sample spikes around each event