neuroprob/filters.py
def filtered_rate(self, F_mu, F_var, unobs_neuron, trials, MC_samples=1):
        """
        Evaluate the instantaneous rate after spike coupling, with unobserved neurons not contributing 
        to the filtered population rate.
        """
        unobs_neuron = self.likelihood._validate_neuron(unobs_neuron)
        spk = self.likelihood.spikes[b].to(self.likelihood.tbin.device)

        with torch.no_grad():
            hist, hist_var = self.spike_filter(spk[..., :-1], XZ)
            hist[:, unobs_neuron, :] = 0 # mask
            hist_var[:, unobs_neuron, :] = 0 # mask
            h = self.mc_gen(F_mu + hist, F_var + hist_var, MC_samples, torch.arange(self.neurons))
            intensity = self.likelihood.f(h.view(-1, trials, *h.shape[1:]))
            
        return intensity

        Evaluate the instantaneous rate after spike coupling, with unobserved neurons not contributing 
        to the filtered population rate.
        
Evaluate the instantaneous rate after spike coupling, with unobserved neurons not contributing
to the filtered population rate.
Evaluate the instantaneous rate after spike coupling with unobserved neurons not contributing to the filtered population rate .
def filtered_rate(self, F_mu, F_var, unobs_neuron, trials, MC_samples=1):
        unobs_neuron = self.likelihood._validate_neuron(unobs_neuron)
        spk = self.likelihood.spikes[b].to(self.likelihood.tbin.device)
        with torch.no_grad():
            hist, hist_var = self.spike_filter(spk[..., :-1], XZ)
            hist[:, unobs_neuron, :] = 0 
            hist_var[:, unobs_neuron, :] = 0 
            h = self.mc_gen(F_mu + hist, F_var + hist_var, MC_samples, torch.arange(self.neurons))
            intensity = self.likelihood.f(h.view(-1, trials, *h.shape[1:]))
        return intensity
def filtered_rate ( self , F_mu , F_var , unobs_neuron , trials , MC_samples = 1 ) : unobs_neuron = self . likelihood . _validate_neuron ( unobs_neuron ) spk = self . likelihood . spikes [ b ] . to ( self . likelihood . tbin . device ) with torch . no_grad ( ) : hist , hist_var = self . spike_filter ( spk [ ... , : - 1 ] , XZ ) hist [ : , unobs_neuron , : ] = 0 hist_var [ : , unobs_neuron , : ] = 0 h = self . mc_gen ( F_mu + hist , F_var + hist_var , MC_samples , torch . arange ( self . neurons ) ) intensity = self . likelihood . f ( h . view ( - 1 , trials , * h . shape [ 1 : ] ) ) return intensity
Evaluate the instantaneous rate after spike coupling, with unobserved neurons not contributing
to the filtered population rate.
Evaluate the instantaneous rate after spike coupling with unobserved neurons not contributing to the filtered population rate .
"""
        Evaluate the instantaneous rate after spike coupling, with unobserved neurons not contributing 
        to the filtered population rate.
        """ # mask # mask
self
F_mu
F_var
unobs_neuron
trials
MC_samples