ComGGL-package {ComGGL} | R Documentation |
The package jointly estimates an undirected graph and homogenous communities of nodes. The structure of the communities is taken into account when estimating the graph and at the same time, the structure of the graph is accounted for when estimating communities of nodes. The procedure uses a joint group graphical lasso approach with community detection-based grouping, such that some groups of edges co-occur in the estimated graph. The grouping structure is unknown and is estimated based on community detection algorithms.
Package: | ComGGL |
Type: | Package |
Version: | 1.0 |
Date: | 2020-03-30 |
License: | GPL-3 |
Eugen Pircalabelu <eugen.pircalabelu@uclouvain.be>
Pircalabelu, E. and Claeskens, G. (2020). Community-based group graphical lasso. Journal of Machine Learning Research. To appear.
library(ComGGL) library(qgraph) data(fmri) # Specify control parameters list.controls=list(penalize.diagonal=FALSE,plotConvergence=F,seedKMEANS=1234, rho=1,maxiterADMM=500,maxiterKMEANS=500,tol=1e-04,alpha=0.7) # Estimate communities of nodes and an undirected graph with X pos.def. Let the procedure estimate K. ptm=proc.time() obj1=ComGGL(Y,lambda1=.4,lambda2=.2,lambda3=1,K=NULL,pd=TRUE,list.controls) obj1$Convergence proc.time()-ptm # Estimate communities of nodes and an undirected graph with X pos.def. Fix K=4. ptm=proc.time() obj2=ComGGL(Y,lambda1=.4,lambda2=.2,lambda3=1,K=4,pd=TRUE,list.controls) obj2$Convergence proc.time()-ptm # Visualize the graphs Q=qgraph(obj1$A, directed=F, weighted=T, layout="circle", rescale=F,borders=T, labels=T,vsize=1, label.scale=F, cut=0, plot=T,label.color=obj1$Components, trans=0.8,vTrans=0.5,esize=3.6,edge.color="#676767") Q=qgraph(obj2$A, directed=F, weighted=T, layout="circle", rescale=F,borders=T, labels=T,vsize=1, label.scale=F, cut=0, plot=T,label.color=obj2$Components, trans=0.8,vTrans=0.5,esize=3.6,edge.color="#676767")