pyro-ppl/pyro

[FR] get mcmc.summary() as DataFrame

Open

#3.013 geöffnet am 26. Jan. 2022

Auf GitHub ansehen
 (6 Kommentare) (1 Reaktion) (0 zugewiesene Personen)Python (981 Forks)batch import
enhancementhelp wantedusability

Repository-Metriken

Stars
 (8.211 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 10T 19h) (1 gemergte PR in 30 T)

Beschreibung

First 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.

Contributor Guide