Hello,

I’ve been playing around with inference in HMC on a nonlinear model of a biochemical network.

I’ve set up a toy model where I am sampling each parameter with an exponential distribution where the mean is the ground truth parameter. After conditioning on the response variables and running HMC, I get mean estimates that are in right ball park but wrong, and more worryingly I get 0 variance.

How can I coax more more variation out of my MCMC?

More specifically;

- the paramters of the model are small positive-valued decimals. For example one parameter (of 12 total is 6.351334e-04
- the parameters are coefficients in a set of nonlinear regression lines representing a physical mechanism. An example is:
`Y = sample('y', Poisson(p1 * X1 / (p1 * X1 + p2 * X2))`

– this reflects the real world physical mechanism between covariates X1 and X2 and response Y. - the parameters themselves are sampled from an exponential with a mean equal to their ground truth values, for example:
`p1 = sample('p1', Exponential(1/ground_truth['p1']))`

I treat the variables like X1, X2, and Y as observed in my model and the parameters as latent. I condition on simulated data, and apply HMC. Here is some actual code:

```
targets = ['egf_sos', 'igf_sos', 'sos_ras', 'ras_pi3k', 'egf_pi3k', 'igf_pi3k']
hmc_kernel = HMC(conditioned_model, step_size=0.0001, num_steps=100)
mcmc_run = MCMC(hmc_kernel, num_samples=500, warmup_steps=100).run()
estimates=OrderedDict()
for target in targets:
marginal = EmpiricalMarginal(mcmc_run, target)
estimates[target] = {
'mean': round(float(marginal.mean), 5),
'sd': round(sqrt(float(marginal.variance)), 5),
'true': round(ground_truth[target], 5)
}
pprint(estimates)
```

The results:

```
OrderedDict([('egf_sos', {'mean': 0.00049, 'sd': 0.0, 'true': 0.00064}),
('igf_sos', {'mean': 0.03779, 'sd': 0.0, 'true': 0.02782}),
('sos_ras', {'mean': 0.27975, 'sd': 0.0, 'true': 0.85372}),
('ras_pi3k', {'mean': 6e-05, 'sd': 0.0, 'true': 6e-05}),
('egf_pi3k', {'mean': 0.00091, 'sd': 0.0, 'true': 0.01154}),
('igf_pi3k', {'mean': 0.00604, 'sd': 0.0, 'true': 0.01154})])
```

Why am I getting 0 variation and how do I fix it?