scripts/model_utils.py
def compute_P(full_model, covariates, show_neuron, MC=1000):
    """
    Compute predictive count distribution given X.
    """
    h = full_model.sample_F(covariates, MC, show_neuron)
    with torch.no_grad():
        logp = full_model.likelihood.get_logp(h, show_neuron).data # samples, N, time, K
    P_mc = torch.exp(logp)
    return P_mc

    Compute predictive count distribution given X.
    
Compute predictive count distribution given X.
Compute predictive count distribution given X .
def compute_P(full_model, covariates, show_neuron, MC=1000):
    h = full_model.sample_F(covariates, MC, show_neuron)
    with torch.no_grad():
        logp = full_model.likelihood.get_logp(h, show_neuron).data 
    P_mc = torch.exp(logp)
    return P_mc
def compute_P ( full_model , covariates , show_neuron , MC = 1000 ) : h = full_model . sample_F ( covariates , MC , show_neuron ) with torch . no_grad ( ) : logp = full_model . likelihood . get_logp ( h , show_neuron ) . data P_mc = torch . exp ( logp ) return P_mc
Compute predictive count distribution given X.
Compute predictive count distribution given X .
"""
    Compute predictive count distribution given X.
    """ # samples, N, time, K
full_model
covariates
show_neuron
MC