diff --git a/spikeometric/models/poisson_glm_model.py b/spikeometric/models/poisson_glm_model.py index 626595bf6..b3155ea56 100644 --- a/spikeometric/models/poisson_glm_model.py +++ b/spikeometric/models/poisson_glm_model.py @@ -12,12 +12,12 @@ class PoissonGLM(BaseModel): More specifically, we have the following equations: - #. .. math:: g_i(t+1) = r \: \sum_{\tau = 0}^{T-1} \sum_{j\in \mathcal{N}(i)} (W_0)_{j, i} X_j(t-\tau)c(\tau) + b_i + \mathcal{E}_i(t+1) + #. .. math:: g_i(t+1) = r \: \sum_{t' = 0}^{T-1} \sum_{j\in \mathcal{N}(i)} (W_0)_{j, i} X_j(t-t')c(t') + b_i + \mathcal{E}_i(t+1) #. .. math:: \mu_i(t+1) = \frac{\Delta t}{\alpha}\: e^{\beta g_i(t+1)} #. .. math:: X_i(t+1) \sim \text{Pois}(\mu_i(t+1)) The first equation is implemented in the :meth:`input` method and gives the input to neuron :math:`i` at time :math:`t+1` - as a convolution of the spike history of the neighboring neurons with a coupling filter :math:`c`, weighted by the + as a convolution of the spike history of the neighboring neurons with a coupling filter :math:`c(t) = e^{- \Delta t \frac{t}{\tau}}`, weighted by the connectivity matrix :math:`W_0`, and scaled by the recurrent scaling factor :math:`r`. There is also a uniform background input :math:`b_i` and an external stimulus :math:`\mathcal{E}_i(t+1)`. @@ -37,7 +37,7 @@ class PoissonGLM(BaseModel): T : int The number of time steps to consider back in time. tau : float - The time constant of the exponential filter. + The time constant of the exponential coupling filter. dt : float The time step of the simulation in milliseconds. r : float @@ -156,4 +156,4 @@ def connectivity_filter(self, W0: torch.Tensor, edge_index: torch.Tensor) -> tor The edge index of the network. """ t = torch.arange(1, self.T+1, dtype=torch.float32, device=W0.device).repeat(W0.shape[0], 1) - return torch.einsum("i, ij -> ij", W0, torch.exp((t -self.T)*self.dt/self.tau)), edge_index \ No newline at end of file + return torch.einsum("i, ij -> ij", W0, torch.exp((t -self.T)*self.dt/self.tau)), edge_index