I want to save all my samples (including burn-in) as csv file, but also be able to access statistics from trace.stat_names.
Saving it like
db = pm.backends.Text(‘MyTrace’)
trace = pm.sample(10000, [updI], start={‘I’:0.5}, trace=db)
the trace.stat_names command returns an empty set.
To get around this, I convert trace into a dataframe :
df = pm.backends.tracetab.trace_to_dataframe(trace)
df.to_csv(“MyTest.csv”)
However, this will let me loose the samples for the burn-in.
Is there are way of achieving both, getting stat_names and burn in?