| Require: adjacency matrix , attributes matrix , iterations , and specified group number | Ensure: group assignment | 0: initialize , , , , set , , , , , , and to 0 | Initialize each node’s latent community label | (1)//sampling z, , , , , and | (2)for to do | (3) for to do | (4) //get the current community assignment of node | (5) update , , , , , , and | (6) for to do | (7) compute probability according to equation (8) | (8) end for | (9) Gibbs sampling for and obtain | (10) update , , , , , , and | (11) for to do | (12) //get the current topic assignment of attribute | (13) update , , , and | (14) for = 1 to do | (15) compute probability according to equation (9) | (16) end for | (17) Gibbs sampling for and obtain | (18) update , , , and | (19) end for | (20) end for | (21) slice sampling for , , , and in (0, 1) | (22)end for |
|