This is a short effort to give users an idea of how long the functions take to process. The benchmarks were performed using the default R install on Travis CI.

We will be estimating a tri-diagonal precision matrix with dimension \(p = 100\):



  • Default convergence tolerance with specified tuning parameter (no cross validation):


# benchmark CVglasso - defaults
microbenchmark(CVglasso(S = sample, lam = 0.1, trace = "none"))
## Unit: milliseconds
##                                             expr      min       lq
##  CVglasso(S = sample, lam = 0.1, trace = "none") 38.30081 39.01058
##      mean  median       uq      max neval
##  39.54015 39.3403 39.73937 47.16266   100


  • Stricter convergence tolerance with specified tuning parameter (no cross validation):


# benchmark CVglasso - tolerance 1e-6
microbenchmark(CVglasso(S = sample, lam = 0.1, tol = 1e-6, trace = "none"))
## Unit: milliseconds
##                                                          expr      min
##  CVglasso(S = sample, lam = 0.1, tol = 1e-06, trace = "none") 65.30402
##        lq     mean   median      uq      max neval
##  67.33803 68.55631 67.86555 68.5757 84.47638   100


  • Default convergence tolerance with cross validation for lam:


## Unit: seconds
##                         expr      min       lq     mean   median       uq
##  CVglasso(X, trace = "none") 1.980687 1.993587 2.007446 2.015235 2.023801
##       max neval
##  2.023918     5


  • Parallel (cores = 2) cross validation:


# benchmark CVglasso parallel CV
microbenchmark(CVglasso(X, cores = 2, trace = "none"), times = 5)
## Unit: seconds
##                                    expr      min       lq     mean
##  CVglasso(X, cores = 2, trace = "none") 2.583931 2.629241 2.647991
##    median       uq     max neval
##  2.641509 2.656996 2.72828     5