janine: Janine: Just Another Network Infernce mEthod

Description Usage Arguments Examples

View source: R/janine.R

Description

Iterate Adaptive Graphical-Lasso with binary SBM estimation to recover the adaptive weights

Usage

1
2
3
4
5
6
7
8
9
janine(
  data,
  partition = NULL,
  n_blocks = NULL,
  penalties = NULL,
  alpha = 0,
  control_optim = list(),
  control_penalties = list()
)

Arguments

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 epsilon (default to 1e-3), a maximal number of iteration max_iter (default 20) and verbosity level trace (default 1).

control_penalties

a list controling how penalties is generated, with three entries: a double min_ratio (default 0.1), a integer length (default 20) and a logical diagonal (default TRUE) indicating weither the diaognal should be penalized or not.

Examples

 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]])

jchiquet/janine documentation built on April 16, 2020, 1:52 a.m.