-
Notifications
You must be signed in to change notification settings - Fork 56
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
Diagnostics: partitioning filtering and naming #260
Conversation
…rther simplify plot_losses
thank you! Could you please provide a small code example for how users would use this new feature? |
Update: the partitioning between filtering and naming is now even clearer! Here are two examples of the updated usage for Example 1: # Let's say we only want to plot the beta prior samples...
filter_keys = ['beta']
variable_names = [r"$\beta_0$", r"$\beta_1$"]
f = bf.diagnostics.plot_samples_2d(
samples=prior_samples,
filter_keys=filter_keys,
variable_names=variable_names,
context="Prior"
) Example 2: # Let's say later we want to plot recovery for all parameters...
filter_keys = ['beta', 'sigma']
variable_names = [r"$\beta_0$", r"$\beta_1$", r"$\sigma$"]
f = bf.diagnostics.plot_recovery(
post_samples=pdraws,
prior_samples=val_sims,
filter_keys=filter_keys,
variable_names=variable_names
) The above examples are streamlined to all |
Give users the ability to rename their variables through separating the filtering and naming processes in
dict_to_arrays
andpreprocess
.Related to #257 .