hglassoBIC | R Documentation |
hglasso
This function calculates the BIC-type criterion for tuning parameter selection for hglasso
proposed in Section 3.4 in Tan et al. (2014)
hglassoBIC(x, S, c=0.2)
x |
An object of class |
S |
A p by p correlation/covariance matrix. Cannot contain missing values. |
c |
A constant between 0 and 1. When c is small, the BIC-type criterion will favor more hub nodes. The default value is c=0.2. |
BIC |
The calculated BIC-type criterion in Section 3.4 in Tan et al. (2014). |
Kean Ming Tan
Tan et al. (2014). Learning graphical models with hubs. To appear in Journal of Machine Learning Research. arXiv.org/pdf/1402.7349.pdf.
hglasso
#library(mvtnorm) #library(glasso) #set.seed(1) #n=100 #p=100 # A network with 4 hubs #network<-HubNetwork(p,0.99,4,0.1) #Theta <- network$Theta #truehub <- network$hubcol # The four hub nodes have indices 14, 42, 45, 78 #print(truehub) # Generate data matrix x #x <- rmvnorm(n,rep(0,p),solve(Theta)) #x <- scale(x) #S <- cov(x) # Run Hub Graphical Lasso with different tuning parameters #lambdas2 <- seq(0,0.5,by=0.05) #BICcriterion <- NULL #for(lambda2 in lambdas2){ #res1 <- hglasso(S,0.3,lambda2,1.5) #BICcriterion <- c(BICcriterion,hglassoBIC(res1,S)$BIC) #} #lambda2 <- lambdas2[which(BICcriterion==min(BICcriterion))]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.