FMGM_mc {fusedMGM}R Documentation

Main function of fused MGM

Description

Infers networks from 2-class mixed data

Usage

FMGM_mc(
  data,
  ind_disc,
  group,
  t = 1,
  L = NULL,
  eta = 2,
  lambda_intra,
  lambda_intra_prior = NULL,
  lambda_inter,
  with_prior = FALSE,
  prior_list = NULL,
  converge_by_edge = TRUE,
  tol_edge = 3,
  tol_mgm = 1e-04,
  tol_g = 0.005,
  tol_fpa = 1e-12,
  maxit = 1e+06,
  polish = TRUE,
  tol_polish = 1e-12,
  cores = parallel::detectCores(),
  verbose = FALSE
)

Arguments

data

Data frame with rows as observations and columns as variables

ind_disc

Indices of discrete variables

group

Group indices, must be provided with the observation names

t

Numeric. Initial value of coefficient that reflect 2 previous iterations in fast proximal gradient method. Default: 1

L

Numeric. Initial guess of Lipschitz constant. Default: missing (use backtracking)

eta

Numeric. Multipliers for L in backtracking. Default: 2

lambda_intra

Vector with 3 numeric variables. Penalization parameters for network edge weights

lambda_intra_prior

Vector with 3 numeric variables. Penalization parameters for network edge weights, applied to the edges with prior information

lambda_inter

Vector with 3 numeric variables. Penalization parameters for network edge weight differences

with_prior

Logical. Is prior information provided? Default: FALSE

prior_list

List of prior information. Each element must be a 3-column data frames, with the 1st and the 2nd columns being variable names and the 3rd column being prior confidence (0,1)

converge_by_edge

Logical. The convergence should be judged by null differences of network edges after iteration. If FALSE, the rooted mean square difference (RMSD) of edge weights is used. Default: TRUE

tol_edge

Integer. Number of consecutive iterations of convergence to stop the iteration. Default: 3

tol_mgm

Numeric. Cutoff of network edge RMSD for convergence. Default: 1e-04

tol_g

Numeric. Cutoff of iternations in prox-grad map calculation. Default: 5e-03

tol_fpa

Numeric. Cutoff for fixed-point approach. Default: 1e-12

maxit

Integer. Maximum number of iterations in fixed-point approach. Default: 1000000

polish

Logical. Should the edges with the weights below the cutoff should be discarded? Default: TRUE

tol_polish

Numeric. Cutoff of polishing the resulting network. Default: 1e-12

cores

Integer. Number of cores to use multi-core utilization. Default: maximum number of available cores

verbose

Logical. If TRUE, the procedures are reported in real-time manner. Default: FALSE

Details

If the value of Lipschitz constant, L, is not provided, the backtracking will be performed

Value

The resulting networks, in the form of a list of MGMs

Examples


data(data_all) ;  # Example 500-by-100 simulation data
data(ind_disc) ;

group <- rep(c(1,2), each=250) ;
names(group) <- seq(500) ;

if (Sys.info()['sysname'] == 'Windows') {
  cores=1
} else {
  cores=parallel::detectCores() ;
}

res_FMGM <- FMGM_mc(data_all, ind_disc, group, 
                    lambda_intra=c(0.2,0.15,0.1), lambda_inter=c(0.2,0.15,0.1), 
                    cores=cores, verbose=TRUE)


[Package fusedMGM version 0.1.0.1 Index]