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

Passing kwargs and args to likelihood function #48

Closed
pacargile opened this issue Sep 5, 2017 · 2 comments
Closed

Passing kwargs and args to likelihood function #48

pacargile opened this issue Sep 5, 2017 · 2 comments
Assignees
Labels
enhancement upgrades and improvements

Comments

@pacargile
Copy link
Contributor

Could you add args= and kwargs= when initializing the NestedSampler object that would take an argument list and/or a keyword dictionary that get passed to the likelihood function? This would allow for likelihood functions of the type lnlike(v,*args,**kwargs), and would allow for backwards compatibility with EMCEE.

@joshspeagle
Copy link
Owner

That's fair. I'll try to get to this at some point next week.

@joshspeagle joshspeagle self-assigned this Sep 7, 2017
@joshspeagle joshspeagle added the enhancement upgrades and improvements label Sep 7, 2017
@joshspeagle
Copy link
Owner

joshspeagle commented Sep 11, 2017

As referenced in the commit, this adds support for both providing args and kwargs to the loglikelihood and prior_transform function via some new input arguments using the same scheme as emcee. I did some brief consistency tests and didn't find anything breaking in both the serial and parallel case. Let me know if you find any bugs @pacargile.

joshspeagle added a commit that referenced this issue Sep 12, 2017
New version release coinciding with a reasonable bugfix. Consolidates
the previous few commits (related to #48 and #49) and includes a further
internal change to how evidence weights are computed in `weight_function`
that should make computations much more stable (which led to problems in
some testing).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement upgrades and improvements
Projects
None yet
Development

No branches or pull requests

2 participants