Description Usage Arguments Examples
Iterate Adaptive Graphical-Lasso with binary SBM estimation to recover the adaptive weights
1 2 3 4 5 6 7 8 9 |
data |
a n x d matrix of multivariate Gaussian observation |
partition |
a factor indicating a known partition of the variables to be respected during the clustering. If NULL (the default), to predfined partition is consider. |
n_blocks |
integer for the target number of groups. If NULL (the default), will be chosen automatically internally by ICL in the SBM fit. |
penalties |
a vector of postive real number in decreasing order tuning the network sparsity. The default (NULL) generates an hopefully appropriate collection of penalties. |
alpha |
a positive scalar tuning the mixture between the weighted-sparse penlaty and the trace-Laplacian regularisation. |
control_optim |
a list controling how the alternate optimization between adaptive graphical-Lasso and SBM is conducted
for each penalty level. Contains three entries: a convergence threshold |
control_penalties |
a list controling how |
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Network settting
nNodes <- 60
blockProp <- c(1/3, 1/3, 1/3) # group proportions
nbBlock <- length(blockProp) # number of blocks
connectParam <- diag(.4, nbBlock) + 0.01 # connectivity matrix: affiliation network
mySBM <- rggm::rSBM(nNodes, connectParam, blockProp)
Omega <- rggm::graph2prec(mySBM, cond_var = rep(1, nNodes), neg_prop = 0.5)
## Multivariate Gaussian Vector generation
n <- 300
X <- rggm::rmgaussian(n, means = rep(0, nNodes), solve(Omega))
## Network inference
fits <- janine(X, penalties = 0.1, control_optim = list(n_cores = 1))
plot(fits$models[[1]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.