Skip to content
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

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

Open
omrihar opened this issue Sep 18, 2022 · 3 comments · May be fixed by #2403
Open

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

omrihar opened this issue Sep 18, 2022 · 3 comments · May be fixed by #2403

Comments

@omrihar
Copy link

omrihar commented Sep 18, 2022

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

@LuchoCateura
Copy link

Hello, I want to help implementing this feature

@lucifer4073
Copy link

Hi, I would like to implement this feature.

@lucifer4073
Copy link

Hi @omrihar can you please review the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants