-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_r_fitting.R
29 lines (21 loc) · 1.06 KB
/
test_r_fitting.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Load libraries
library(netcompLib)
library(netcompSBM)
library(diagram)
library(abind)
library(igraph)
gsize = 60
netm = NetworkModelSBM(Nnodes = gsize, model_param = set_model_param(block_assign = rep(1:2, each = gsize/2), block_probs = matrix(c(.7, .2, .2, .4), nrow = 2)))
#|----##Function parameters changed -- only model_params --Thu Jul 30 20:22:23 2015--
adjm = sampleNetwork(netm)[,,1]
test = fit_SBM_v2(adjm = adjm, Nclass = 2, Niter = 100, method = "mf", verbose = 2)
#|----##Renamed to fit_SBM --Tue May 26 21:03:28 2015--
test = fit_SBM_v2(adjm = adjm, Nclass = 2, Niter = 50, method = "bp", verbose = 2)
#|----##Renamed to fit_SBM --Tue May 26 21:03:28 2015--
test = fit_SBM_v2(adjm = adjm, Nclass = 2, Niter = 100, method = "bp_scaled", verbose = 2)
#|----##Renamed to fit_SBM --Tue May 26 21:03:28 2015--
test = fit_SBM_BP(adjm = adjm, Nclass = 2, Niter = 100, stop_thres = 0.001)
load("test.RData")
diag(test.mat) = 0
fit_SBM_v2(adjm = test.mat, Nclass = 3, Niter = 100, method = "mf", verbose = 2)
#|----##Renamed to fit_SBM --Tue May 26 21:03:28 2015--