how efficient is extraction of L using cholmod.spsolve?

123 views
Skip to first unread message

Dima Pasechnik

unread,
Oct 30, 2012, 12:09:53 PM10/30/12
to cvx...@googlegroups.com
In principle, cholmod.symbolic(), cholmod.numeric(), and cholmod.spsolve() allow one to compute the Cholesky factors of L, L^T of a sparse symmetric PD matrix A. How (in)efficient is this compared to directly using cholmod's chol2 etc?
 (suppose one somehow has gotten Python interface to chol, chol2, etc).

Are there better ways to do explicit Cholesky factorizations in CVXOPT?

Thanks,
Dima
 

Joachim Dahl

unread,
Oct 31, 2012, 2:37:39 AM10/31/12
to cvx...@googlegroups.com
There is actually a function for it:

cvxopt.cholmod.getfactor(B)

where B is a cholmod numeric factor will return an spmatrix view of the
numeric factor. The numeric factor must be obtained with the "simplicial"
algorithm, i.e., options['supernodal']=0.

There are few undocumented utility functions like that that are mostly
meant for our own use a few places. 

--
You received this message because you are subscribed to the Google Groups "CVXOPT" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cvxopt/-/g1WuHGnBO_gJ.

To post to this group, send email to cvx...@googlegroups.com.
To unsubscribe from this group, send email to cvxopt+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cvxopt?hl=en.

Dima Pasechnik

unread,
Oct 31, 2012, 1:11:01 PM10/31/12
to cvx...@googlegroups.com
Hi Joachim,


On Wednesday, 31 October 2012 14:37:40 UTC+8, Joachim Dahl wrote:
There is actually a function for it:

cvxopt.cholmod.getfactor(B)

where B is a cholmod numeric factor will return an spmatrix view of the
numeric factor. The numeric factor must be obtained with the "simplicial"
algorithm, i.e., options['supernodal']=0.

Thanks, it's good to know (reading the documentation gives an impression that that data is just not there, and needs to be computed, or that there is no Python interface present). 
Is there a similar function to get the permutation (matrix) P (for factorizations of the form
PAP^T=LL^T or LDL^T) ?

IMHO it's ought to get documented...
It seems to be the only Python functionality for dealing with sparse Cholesky!

Dima

Dima Pasechnik

unread,
Oct 31, 2012, 1:15:31 PM10/31/12
to cvx...@googlegroups.com


On Thursday, 1 November 2012 01:11:01 UTC+8, Dima Pasechnik wrote:
Hi Joachim,

On Wednesday, 31 October 2012 14:37:40 UTC+8, Joachim Dahl wrote:
There is actually a function for it:

cvxopt.cholmod.getfactor(B)

where B is a cholmod numeric factor will return an spmatrix view of the
numeric factor. The numeric factor must be obtained with the "simplicial"
algorithm, i.e., options['supernodal']=0.

Thanks, it's good to know (reading the documentation gives an impression that that data is just not there, and needs to be computed, or that there is no Python interface present). 
Is there a similar function to get the permutation (matrix) P (for factorizations of the form
PAP^T=LL^T or LDL^T) ?

IMHO it's ought to get documented...
It seems to be the only Python functionality for dealing with sparse Cholesky!

I was actually trying to explain how to compute sparse Cholesky factorizations in Sage here: 
So you see how absence of documentation can hurt!

Joachim Dahl

unread,
Oct 31, 2012, 1:48:02 PM10/31/12
to cvx...@googlegroups.com

To work with a particular ordering, use order.amd() and subsequently use that ordering as an argument to cholmod.symbolic(). Alternatively use CHOMPACK, which we wrote ourselves - it is perhaps more flexible and better integrated.

--
You received this message because you are subscribed to the Google Groups "CVXOPT" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cvxopt/-/xrHSQsRcDf4J.
Reply all
Reply to author
Forward
0 new messages