# Help understanding an epidemic model?

Hi! In trying to learn Pyro, I ran across the following model from:

``````@config_enumerate
def reparameterized_discrete_model(args, data):
# Sample global parameters.
rate_s, prob_i, rho = global_model(args.population)

# Sequentially sample time-local variables.
S_curr = torch.tensor(args.population - 1.0)
I_curr = torch.tensor(1.0)
for t, datum in enumerate(data):
# Sample reparameterizing variables.
# When reparameterizing to a factor graph, we ignored density via
# .mask(False). Thus distributions are used only for initialization.
S_prev, I_prev = S_curr, I_curr
S_curr = pyro.sample(
)
I_curr = pyro.sample(
)

# Now we reverse the computation.
S2I = S_prev - S_curr
I2R = I_prev - I_curr + S2I
pyro.sample(
"S2I_{}".format(t),
dist.ExtendedBinomial(S_prev, -(rate_s * I_prev).expm1()),
obs=S2I,
)
pyro.sample("I2R_{}".format(t), dist.ExtendedBinomial(I_prev, prob_i), obs=I2R)
pyro.sample("obs_{}".format(t), dist.ExtendedBinomial(S2I, rho), obs=datum)
``````

I have a few questions about what the strategy is here:

1. What are we actually enumerating over? The discrete variables either have a provided observation — so I’m assuming they just add `+Dist(obs | pars)` to the logpdf — or are masked, so I’m assuming are not part of enumeration?