cvComGGL {ComGGL}R Documentation

K-fold cross-validation for ComGGL graphs.

Description

The function performs K-fold CV to select the regularization parameters.

Usage

cvComGGL(Kfolds,Y,lambda1,lambda2,lambda3,K,pd,list.controls)

Arguments

Kfolds

The number of folds used for cross-validation; default is 3.

Y

Data matrix of dimension nxp.

lambda1

Regularization parameter that dictates the sparsity of the undirected graphs

lambda2

Regularization parameter that controls the grouping effect

lambda3

Regularization parameter that controls the balance between S (empirical covariance matrix) and X in the objective function; default is 1.

K

The number of desired communities of nodes; default is NULL and the function searched for an optimal number of communities.

pd

Indicator if X be assumed positive definite; default is TRUE. If pd=FALSE is used, then the function assumes X should be positive semi-definite.

list.controls

List of control parameters specifying

penalize.diagonal: Indicator if the diagonal should be penalized or not; default is FALSE

plotConvergence: Indicator if the convergence graphs should be ploted or not or not; default is FALSE

seedKMEANS: Seed for the K-means algorithm; default is 1234

rho: Parameter used for the ADMM optimizer; default is 1

maxiterADMM: Number of maximal iterations of the ADMM; default is 500

maxiterKMEANS: Number of maximal iterations of the K-means algorithm; default is 500

tol: Tolerance threshold for assesing convergence; default is 1e-04

alpha: Parameter used for the ADMM optimizer; default is 0.7

Value

A list containing the objects:

OptLamba_loglik

Optimal triple (lambda1,lambda2,lambda3) when the log-likelihood loss is used.

OptLamba_tr

Optimal triple (lambda1,lambda2,lambda3) when the log-likelihood loss is used.

Performance

Loglikelihood loss and the Trace loss for all triplets.

Examples

data(fmri)
lambda1=c(.2,.4)
lambda2=c(.1,.3)
lambda3=c(1,2)
obj=cvComGGL(3,Y,lambda1,lambda2,lambda3)

[Package ComGGL version 1.0 Index]