powered by
Dirichlet process sampler
sampler.dp(currsbm, edges, sbmmod, sigma)
the current state of the sampler
an edges object
edges
an sbmmod model
sbmmod
random walk parameter for theta
next state of currsbm object
currsbm
For full algorithm details see http://doi.org/10.17635/lancaster/thesis/296
# NOT RUN { model <- sbmmod(crp(4), param_norm(0,0,1,1,3,3,1,1), edges_norm()) trueSBM <- model$r(100) Edges <- redges(trueSBM, model$edge) dp_out <- sampler(Edges, model, 25, "dp", sigma=0.1) # }
Run the code above in your browser using DataLab