justinalsing/pydelfi

Bugs in examples (after new edits)

NiallJeffrey opened this issue · 4 comments

The latest "jla_sne.ipynb" example doesn't work.
The line with DelfiEnsemble.fisher_pretraining() now gives an error:

Traceback (most recent call last): File ".../python3.6/site-packages/emcee/ensemble.py", line 519, in __call__ return self.f(x, *self.args, **self.kwargs) TypeError: log_posterior_stacked() missing 1 required positional argument: 'data'

Also, the initial module loads are now wrong (this isn't a huge issue), they should be:

import pydelfi.ndes as ndes
import pydelfi.delfi as delfi
import pydelfi.score as score
import pydelfi.priors as priors

Thanks for this; fixed now just testing before I push

Now fixed and pushed - let me know if you continue to have problems

The fisher_pretraining works, but now the sequential neural training fails:

anaconda3/lib/python3.6/site-packages/emcee/ensemble.py", line 519, in __call__
return self.f(x, *self.args, **self.kwargs)
File "/Users/ucapnje/anaconda3/lib/python3.6/site-packages/pydelfi-0.1-py3.6.egg/pydelfi/delfi.py", line 471, in <lambda>
self.emcee_sample(log_likelihood = lambda x: self.log_geometric_mean_proposal_stacked(x, self.data)[0], \
TypeError: log_geometric_mean_proposal_stacked() takes 2 positional arguments but 3 were given

Just fixed this - should work now