-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or requestpymc3This issue relates to PyMC3This issue relates to PyMC3
Description
We can create a function that constructs a RandomVariable
class for a given PyMC3 Distribution
class. The basic requirements are
- that Add log-likelihoods to
RandomVariable
s #109 be in place andlog_lik = Distribution.logp(out_var)
, Distribution.__init__
is utilized inRandomVariable.make_node
and its signature is used to determine the signature ofRandomVariable.make_node
, as well (see the examples here),- and
Distribution.random
is the backing implementation withinRandomVariable.perform
.
One complication that comes to mind involves requirement 3.; most implementations of Distribution.random
use draw_values
, which would be redundant within RandomVariable.perform
, since pre-computed samples of all dependent terms already appear as arguments
to RandomVariable.perform
. We would have to override draw_values
in that context so that it simply returns RandomVariable.perform
arguments. It seems like we could use something like mock
to accomplish that easily.
AlexAndorra
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpymc3This issue relates to PyMC3This issue relates to PyMC3