Skip to content

[Feature Request] Allow transform to support a dictionary #2117

@omrihar

Description

@omrihar

First off, thanks for the great project! I love it!

I often use pymc to fit GLMs with a log-link function. This means that I frequently am interested in transforming some of the variables, but not others, by applying np.exp in the plots. In order to do this I usually would then need to plot separately the log-transformed variables and those that are not. I think it would be great if transform supported a dictionary syntax, for example the following:

az.plot_forest(inference_data, transform={'α': np.exp})

Now I would do something like:

az.plot_forest(inference_data, var_names='α', transform=np.exp)
# ...
az.plot_forest(inference_data, var_names=['γ', 'σ'])

Thanks!

If there is interest in this feature I'm willing to try to implement this, but may take me a while, time permitting...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions