Skip to content

hide transformed variables from the user #1367

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

Merged
merged 1 commit into from
Sep 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pymc3/backends/tracetab.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ def trace_to_dataframe(trace, chains=None, flat_names=None):
var_shapes = trace._straces[0].var_shapes
if flat_names is None:
flat_names = {v: create_flat_names(v, shape)
for v, shape in var_shapes.items()}
for v, shape in var_shapes.items()
if not v.endswith('_')}

var_dfs = []
for varname, shape in var_shapes.items():
vals = trace.get_values(varname, combine=True, chains=chains)
flat_vals = vals.reshape(vals.shape[0], -1)
var_dfs.append(pd.DataFrame(flat_vals, columns=flat_names[varname]))
if not varname.endswith('_'):
vals = trace.get_values(varname, combine=True, chains=chains)
flat_vals = vals.reshape(vals.shape[0], -1)
var_dfs.append(pd.DataFrame(flat_vals, columns=flat_names[varname]))
return pd.concat(var_dfs, axis=1)


Expand Down