Skip to content
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

Add log-likelihoods to RandomVariables #109

Open
brandonwillard opened this issue Jun 6, 2020 · 0 comments
Open

Add log-likelihoods to RandomVariables #109

brandonwillard opened this issue Jun 6, 2020 · 0 comments
Labels
enhancement New feature or request pymc3 This issue relates to PyMC3

Comments

@brandonwillard
Copy link
Contributor

brandonwillard commented Jun 6, 2020

In RandomVariable.make_node, return theano.gof.Apply(self, inputs, (rng.type(), out_var, log_lik))—where log_lik is a graph of the log-likelihood for the given RV. This addition will allow RandomVariables to represent both measure and sample-space graphs.

In this case, a random variable's—e.g. rv—complete log-likelihood would always be available as rv.owner.outputs[-1].

Since owner information needs to be attached to Op outputs, we can't take that approach (e.g. some log-likelihoods may be constants). Instead, we should simply provide a logp function that constructs the measure-space graph for a given RandomVariable output using its RandomVariable.logp implementation.

@brandonwillard brandonwillard added enhancement New feature or request pymc3 This issue relates to PyMC3 labels Jun 6, 2020
@brandonwillard brandonwillard changed the title Add log-likelihood as an output in RandomVariable Add log-likelihoods to RandomVariables Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pymc3 This issue relates to PyMC3
Projects
None yet
Development

No branches or pull requests

1 participant