Min-2-norm solution via factorize-and-solve (separating SPQR factorization and solve) #983
Unanswered
samiran-kawtikwar
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to compute the minimum$\ell_2$ -norm solution to an OLS problem
min ||Ax - b||
using SuiteSparseQR.When the system is underdetermined (i.e., fewer rows than columns), the direct solve interface:
cholmod_dense* x_direct = SuiteSparseQR<double>( SPQR_ORDERING_DEFAULT, SPQR_DEFAULT_TOL, A, B, &cc);
does return the minimum 2-norm solution, as expected.
However, I'm looking for a way to reuse the factorization of
A
across multiple right-hand sidesb
. So I tried theSuiteSparseQR_factorize
+SuiteSparseQR_solve
route:But this does not return the minimum-norm solution—it seems to return a basic solution instead.
I also saw the function
SuiteSparseQR_min2norm
, but it appears to be a one-shot solve that doesn't let me reuse the factorization whenA
is fixed.❓ My question:
Is there a way to compute the minimum 2-norm solution using SPQR by first factorizing
A
and then solving multiple times with differentb
?See more discussion with a MWE in issue #982
Beta Was this translation helpful? Give feedback.
All reactions