The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
library(nett)
library(Matrix)
Let us create a simple degree-corrected planted parition (DCPP) model:
set.seed(1)
= 1000 # the number of nodes
n = 4 # the number of true communties
Ktru = 15 # the average degree
lambda = 0.1 # the out-in ratio
oir = rep(1,Ktru)/Ktru
pri <- EnvStats::rpareto(n, 2/3, 3) # node conn. propensity parameter
theta
= pp_conn(n, oir, lambda, pri, theta)$B # create connectivity matrix
B = sample(Ktru, n, replace=T, prob=pri) # sample node labels
z = sample_dcsbm(z, B, theta) # sample the adjacency matrix A
Check to see if the average degree matches the target:
mean(rowSums(A))
#> [1] 15.118
Compute and plot the community profile based on SNAC+ test statistic:
= snac_resample(A, nrep = 10, ncores = 1)
tstat #> Warning: did not converge in 10 iterations
plot_smooth_profile(tstat, "A DCPP network")
See the article Adjusted chi-square test for degree-corrected block models, Zhang and Amini for how these profiles are constructed.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.