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 sample_stats for PyStan #176

Merged
merged 1 commit into from
Aug 27, 2018
Merged

add sample_stats for PyStan #176

merged 1 commit into from
Aug 27, 2018

Conversation

ahartikainen
Copy link
Contributor

Add sample_stats for PyStan.

@ahartikainen
Copy link
Contributor Author

I added lp__ to here. Is this correct thing to do or should it be inside posterior?

@ColCarroll
Copy link
Member

Looks good to me -- can merge when tests pass.

Is lp__ the log probability? Maybe we should rename it to log_probability - there is an open PR to add that to PyMC3 where it is called logp(pymc-devs/pymc#3134), and I think sampler stats is the right place for it. I'll add a PR to the pymc3 converter with whatever name you prefer.

@canyon289
Copy link
Member

Basic question but what does lp stand for?

@ahartikainen
Copy link
Contributor Author

ahartikainen commented Aug 26, 2018

It is either log-density or log-probability depending on the underlying Stan model.

E.g. target += normal_lpdf(...) is for probs and y ~ normal(...) drops constants --> density.

@ColCarroll
Copy link
Member

I really like including that in sampler stats. Maybe we call it log_density since that technically covers both cases?

@junpenglao
Copy link
Contributor

log_density could be confusing, I dont mind keeping it as lp__ actually - it minimized the name changes across in Stan, and we dont have it yet anyway in pymc3.

@ahartikainen
Copy link
Contributor Author

I guess we can keep it as is (I stripped __ from the end)

@ColCarroll ColCarroll merged commit a0f0637 into arviz-devs:master Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants