-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Change graph_lasso to exploit block diagonal structure #4787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the PR. This looks like a great addition. We have a bit of a backlog on contributions, unfortunately. Maybe @GaelVaroquaux can find time to look at this one, as he created the original estimator. |
No problem, obviously nothing urgent. On Mon, Jun 1, 2015 at 10:32 AM Andreas Mueller notifications@github.com
|
Hi Brett, Do you mind rebasing master onto the branch? The PR is kind of old :) Cheers, |
@bnaul can you rebase? I will have a look this week |
406f6f3
to
cfdb3fd
Compare
@agramfort rebased! Travis is only unhappy because of |
@agramfort any luck in reviewing this? |
no luck soon... sprint is over and priorities changed :(
|
The block diagonal components of the graphical lasso solution can be identified by thresholding the same covariance matrix; the solution can then be found by solving a subproblem corresponding to each component, which can be much faster if the graph is very sparse. See http://faculty.washington.edu/dwitten/Papers/jcgs.2011.pdf for details.
@bnaul Testing this modification with my completely-non-zero 1288x1288 input matrix has a runtime ~2x higher than the current |
I took a stab at implementing the optimization described here: the block diagonal structure of the graphical lasso solution can be identified by thresholding the sample covariance, and the exact solution is found by solving the graphical lasso for each block separately. The authors find that there is a huge speedup when the solution is very sparse; when the solution is mostly dense, the results are basically the same (or very slightly slower due to the extra thresholding step). This modification was made in the

glasso
R package some time ago; timing results are given in the paper above, but I also ran a test of my implementation with p=1000, n=100 and a block diagonal population covariance matrix.Couple of questions:
glasso
R package was changed to only use this algorithm, so I followed the same convention and did not allow the user to choose whether to perform the block diagonal screening procedure. It would be very easy to add this, I'm just not sure if there's a case where it would ever be desired.