Skip to content

A Python front-end for the large-scale graphical LASSO optimizer BigQUIC (written in R).

License

Notifications You must be signed in to change notification settings

gregversteeg/py_bigquic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Run BigQUIC Graphical LASSO (GLASSO) solver in Python

  1. Install R.
  2. Run this command within R.
install.packages('BigQuic', repos='http://cran.us.r-project.org')
  1. Install rpy2 to call R from python (from the command line). (Also pip install sklearn and numpy if you don't already have them.)
pip install rpy2
  1. Run python py_bigquic.py to test.
  2. An example usage is below.
import numpy as np
import py_bigquic as pbq

data_array = np.random.random((10,20))  # A test data array with 10 samples, 20 variables
alpha = 0.5  # The sparsity hyper parameter
prec = pbq.bigquic(data_array, alpha)  # Returns the precision matrix

I implemented this to do large-scale comparisons on high-dimensional, under-sampled covariance estimation with Linear CorEx. If you are interested in this type of application, I strongly recommend checking Linear CorEx out, as it outperforms GLASSO in many scenarios! Results will be added to this paper: Low Complexity Gaussian Latent Factor Models and a Blessing of Dimensionality.

About

A Python front-end for the large-scale graphical LASSO optimizer BigQUIC (written in R).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages