Solving Ax = b with a minimized x l2 norm

448 views
Skip to first unread message

doun...@student.liu.se

unread,
Oct 25, 2013, 4:26:41 AM10/25/13
to ceres-...@googlegroups.com
Hi,

I am currently doing my master thesis on The University of Linköping (Sweden). I wish to create a direction field that is describing a mesh, very common to what this paper describes:
http://www.cs.columbia.edu/~keenan/Projects/TrivialConnections/paper.pdf

What I've come down to now is that I've got my self a linear system Ax = b, where I want to find x. Also for a proper solution I wish to find the minimum ||x|| that solves the problem. Right now I've tried the ceres solver using cost functions that returns residuals in a simple manner, something like this: 
residual = |(Ax - b)| + |x|

But it havent given me any decent results yet. So far I usually end up with a vector x containing zeroes (which doesnt solve the system Ax = b). 

When googling around I get the impression that this is a common problem in mathematics. So if anyone have done similar things, such as solving linear systems and/or minimizing vectors and got some words of advice it would be most appreciated!


//Douglas

doun...@student.liu.se

unread,
Oct 25, 2013, 4:29:06 AM10/25/13
to ceres-...@googlegroups.com
Forgot to mention:

A is a underconstrained sparse matrix. i.e. there is more than one solution to the Ax = b problem!

Sameer Agarwal

unread,
Oct 25, 2013, 8:10:05 AM10/25/13
to ceres-...@googlegroups.com

Douglas you do not need ceres to solve this problem. You should use a linear least squares solver. E.g. you can use suitesparseqr to solve your problem easily and in one step.
Sameer

On Oct 25, 2013 1:29 AM, <doun...@student.liu.se> wrote:
Forgot to mention:

A is a underconstrained sparse matrix. i.e. there is more than one solution to the Ax = b problem!

--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/7e409761-05f6-4f68-8d9d-7903c6ad5079%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Douglas Nordwall

unread,
Oct 30, 2013, 5:19:34 AM10/30/13
to ceres-...@googlegroups.com
Im sitting on a windows system and having a bad time trying to build SuitesparseQR. Do you know any other libraries (preferably supported for windows) that you could recommend for solving this problem?

//Douglas

Jon Simpkins

unread,
Oct 30, 2013, 8:28:02 AM10/30/13
to ceres-...@googlegroups.com
For a linear least-squares solution, Eigen might be a good alternative. Great library, and easy to use.

Also, these might be some good notes on the problem it seems like you're working on.

Best,
-Jon


On Wed, Oct 30, 2013 at 5:19 AM, Douglas Nordwall <doun...@student.liu.se> wrote:
Im sitting on a windows system and having a bad time trying to build SuitesparseQR. Do you know any other libraries (preferably supported for windows) that you could recommend for solving this problem?

//Douglas

--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages