[FR] get mcmc.summary() as DataFrame
See original GitHub issueFirst of all thanks for the great package!
Issue Description
One of the useful features of the MCMC
class is the MCMC.summary()
method which prints summary statistics of the sampled chain.
In this issue I’m asking for the feature to be able to get this table as a Pandas
DataFrame
.
Code Snippet
def model(data):
...
nuts_kernel = NUTS(model)
mcmc = MCMC(nuts_kernel, num_samples=500)
mcmc.run(data)
mcmc.summary()
It would be very helpful if there was a simple way to get mcmc.summary
as DataFrame
or perhaps alternatively as a dict
which can become a DataFrame
.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Summary to pandas dataframe - numpyro
@mahdik You can use summary utility for samples from mcmc.get_samples(group_by_chain=True) to get a dict of stats.
Read more >'MCMCvis' package
MCMCsummary is used to output summary information from MCMC output as a data.frame. All digits are reported by default. We'll use the built...
Read more >tidy.mcmc.list: Return a tidy data summary of an MCMC object
It takes an mcmc.list object from coda.samples and return a data frame ... find with fitting a model using jags.model() , and coda.samples...
Read more >Make chain summaries easier to extract and store #71 - GitHub
It would be nice to get that for free. The other option is just DataFrames with a 1st column of Symbols. How would...
Read more >How to convert MCMC diagnostics to Latex table?
To find the appropriate quantities, use the names() function in R. ... mock_mcmc = mcmc(rnorm(1000)) s = summary(mock_mcmc) stats_table ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
i believe you need
group_by_chain=False
; please refer to the docstring for detailsYes @noamsgl this would be a great first contribution! You’d need to
pandas
is already a test dependency)