sampler.conj: Conjugate model sampler

Description Usage Arguments Value Note Examples

View source: R/sampler.R

Description

Conjugate model sampler

Usage

1

Arguments

currsbm

the current state of the sampler

edges

an edges object

sbmmod

an sbmmod model

sigma

unused

...

additional arguments for sbmmod$marglike

Value

next state of currsbm object

Note

If using the CRP as the block model, then this is the IRM sampler of Schmidt or Morup (Schmidt, M.N. and Morup, M., 2013. Nonparametric Bayesian modeling of complex networks: An introduction. IEEE Signal Processing Magazine, 30(3), pp.110-128.)

Examples

1
2
3
4
model <- sbmmod(crp(3), param_beta(1,1,1,1), edges_bern(), marglike=marglike_bern)
trueSBM <- model$r(100)
Edges <- redges(trueSBM, model$edge)
out <- sampler(Edges, model, 10, "conjugate")

SBMSplitMerge documentation built on July 1, 2020, 5:23 p.m.