Huge (Huge-Dimensional Undirected Graph Estimation) implements the algorithm of estimating the parameters of a Gaussian distribution in such a way that the resulting undirected graphical model is sparse. The core algorithm is implemented in C++ with RcppEigen support for portable high performance linear algebra. It also implements a unified framework to quantify local and global inferential uncertainty for high dimensional graphical models. In particular, we consider the problems of testing the presence of a single edge. Runtime profiling is documented in the Performance section.
Huge uses OpenMP to enables faster matrix multiplication. So, to use huge, you must correctly enables OpenMP for the compiler.
For Windows and Linux users, newest version of GCC has fully support of OpenMP.
But for MAC OS users, things are a little tricky since the default llvm on MAC OS does not support OpenMP. But the solution is easy. You can simply install llvm with full OpenMP support and direct R using this version of llvm.
First, install llvm with OpenMP support by typing
brew install llvm
Then append the following lines into ~/.R/Makevars
to enable llvm with OpenMP support to be the compiler for R packages.
CC = /usr/local/bin/clang-omp
CXX = /usr/local/bin/clang-omp++
CXX98 = /usr/local/bin/clang-omp++
CXX11 = /usr/local/bin/clang-omp++
CXX14 = /usr/local/bin/clang-omp++
CXX17 = /usr/local/bin/clang-omp++
OBJC = /usr/local/bin/clang-omp
OBJCXX = /usr/local/bin/clang-omp++
First, you need to install the devtools package. You can do this from CRAN. Invoke R and then type
install.packages(devtools)
Then load the devtools package and install huge
library(devtools)
install_github("HMJiangGatech/huge")
library(huge)
Windows User: If you encounter a Rtools version issue: 1. make sure you install the latest Rtools; 2. try the following code
assignInNamespace("version_info", c(devtools:::version_info, list("3.5" = list(version_min = "3.3.0", version_max = "99.99.99", path = "bin"))), "devtools")
Ideally you can just install and enable huge using with the help of CRAN on an R console.
install.packages("huge")
library(huge)
#generate data
L = huge.generator(n = 50, d = 12, graph = "hub", g = 4)
#graph path estimation using glasso
est = huge(L$data, method = "glasso")
plot(est)
#inference of Gaussian graphical model at 0.05 significance level
T = est$icov[[10]]
inf = huge.inference(L$data, T, L$theta)
print(inf$error) # print out type-I error
For detailed implementation of the experiments, please refer to benchmark/benchmark.R
We compared our package on hub graph with (n=200,d=200) with other packages, namely, QUIC and clime. Huge significantly outperforms clime, QUIC and original huge in timing performance. We also calculated the likelihood for estimation.
CPU Times(s) Huge glasso 1.12 Huge tiger 1.88 Huge v1.2.7 1.80 QUIC 7.50 Clime 416.77 Object value Huge glasso -125.96 Huge tiger -125.47 QUIC -90.58 Clime -136.96When using the Gaussian graphical model, huge controls the type I error well.
band hub scale-free significance level 0.05 0.10 0.05 0.10 0.05 0.10 type I error 0.0175 0.0391 0.0347 0.0669 0.0485 0.0854[1] T. Zhao and H. Liu, The huge Package for High-dimensional Undirected Graph Estimation in R, 2012 [2] Xingguo Li, Jason Ge, Haoming Jiang, Mingyi Hong, Mengdi Wang, and Tuo Zhao, Boosting Pathwise Coordinate Optimization: Sequential Screening and Proximal Subsampled Newton Subroutine, 2016 [3] Quanquan Gu, Yuan Cao, et al. Local and Global Inference for High Dimensional Nonparanormal Graphical Models [4] Confidence intervals for high-dimensional inverse covariance estimation [5] D. Witten and J. Friedman, New insights and faster computations for the graphical lasso,2011 [6] N. Meinshausen and P. Buhlmann, High-dimensional Graphs and Variable Selection with the Lasso, 2006
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.