Skip to content
Snippets Groups Projects
Commit 92e4b033 authored by Matthew Pitkin's avatar Matthew Pitkin
Browse files

sampler.py: minor fix

parent d17fb19e
No related branches found
No related tags found
1 merge request!139Add PyMC3 sampler
......@@ -1266,7 +1266,7 @@ class Pymc3(Sampler):
# check required attributes exist
if (not hasattr(self.likelihood, 'x') or
not hasattr(self.likelihood, 'y') or
not hasattr(self.likelihood, 'func') or
not hasattr(self.likelihood, 'function') or
not hasattr(self.likelihood, 'function_keys')):
raise ValueError("Poisson Likelihood does not have all the correct attributes!")
......@@ -1275,7 +1275,7 @@ class Pymc3(Sampler):
raise ValueError("Prior key '{}' is not a function key!".format(key))
# get rate function
rate = self.function(self.likelihood.x, **self.pymc3_priors)
rate = self.likelihood.function(self.likelihood.x, **self.pymc3_priors)
# set the distribution
pymc3.Poisson('likelihood', mu=rate, observed=self.likelihood.y)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment