-
-
Notifications
You must be signed in to change notification settings - Fork 112
Wrap tfp distributions as pm RVs #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Cool! I guess since you set I might use
because I like Looks good to merge, but I'll give it a few more hours in case there's input. |
@ColCarroll That does indeed work! I like And no, I manually typed out the distributions, since I use vim with very few plugins 😛 |
Looking carefully, tfp does not implement the following distributions, which are currently supported in PyMC3. There are some fairly important ones here: we'll need to decide what we want to do there (i.e. implement the RVs ourselves, submit PRs to tfp, or drop support for the obscure distributions). We should go ahead and merge this PR, and deal with the rest of these distributions in subsequent PRs. Continuous:
Discrete:
Multivariate:
Timeseries:
|
This will be nice, not adding them piecemeal. Thanks, @eigenfoo! |
What happens if there is a distribution that can't be based of a (existing) TFP distribution? TFD Distributions have so many methods. In PyMC3 you could at least attempt to provide your own .log_p() and sample(). |
(Following up @twiecki's suggestion)
This PR wraps
tfp.distribution
s aspm.RandomVariable
s. We enter the list of tfp distributions we want as strings in__all__
, and the for loop at the end of the module should define the necessary classes.Some notes:
Chi2
, notChiSquared
).