-
Notifications
You must be signed in to change notification settings - Fork 7
two sets of shape hyperparameters for the Beta hyperprior in the SBM #68
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
two sets of shape hyperparameters for the Beta hyperprior in the SBM #68
Conversation
MaartenMarsman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this update @sekulovskin. I have three suggestions for the code update, see my comments:
- The null check on between parameters I think always stops bgm because between parameters default to null. I think it is better to not pass null values (see comment 3).
- There is a change in NUTS default, perhaps this is due to a recent update to bgms main. Could you revert this?
- I suggest to not add a switch to all SBM functions, but instead simply pass between parameters everywhere. Then full control over the model is in the R interface, and the c++ code update simplifies. Let me know if you need help with this!
~ Maarten
| stop("If you wish to specify different between and within cluster probabilites, | ||
| provide both beta_bernoulli_alpha_between and beta_bernoulli_beta_between, | ||
| otherwise leave both NULL.") | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I read this correctly, this will stop the analysis if the between parameters are left at their defaults. This means users cannot use bgms, except when they set other values for these defaults, irrespective if they use an SBM prior or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is in case the user specifies only one of the between parameters, but not both. Otherwise running the code below did work. But it doesn't matter now, since as you requested, both sets of hyperparameters are always provided.
fit <- bgm(Wenchuan[c(1:100), c(1:5)], edge_prior = "Stochastic-Block",
beta_bernoulli_alpha = 1,
beta_bernoulli_beta = 1,
beta_bernoulli_alpha_between = NULL,
beta_bernoulli_beta_between = NULL,
update_method = "adaptive-metropolis",
iter = 1000)
c925d92
into
Bayesian-Graphical-Modelling-Lab:main
I have implemented the two sets of shape hyperparameters. @MaartenMarsman me know what you think. If this approach is the way to go, then I will also include the new arguments in the roxygen of
bgms.R.