commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-1094) Incorrect linear system solution
Date Sun, 26 Jan 2014 11:36:37 GMT

    [ https://issues.apache.org/jira/browse/MATH-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13882277#comment-13882277
] 

Luc Maisonobe commented on MATH-1094:
-------------------------------------

I think the behaviour is correct.

The getSolver method for QR decomposition provides a solver for A X = B in the least squares
sense.

This means the X comuted by the solver is minimizes || A X - B ||, it does not find 0, only
a minumum norm.
In your case, the system is rectangular, so there is no way a true solution can be achieved.

I have verified (using simple loops and gnuplot countour plots) that indeed the x = 7.5, y
= 5.5 does minimizes the norm, which is 39.0.

> Incorrect linear system solution
> --------------------------------
>
>                 Key: MATH-1094
>                 URL: https://issues.apache.org/jira/browse/MATH-1094
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.2
>         Environment: Oracle JDK7
> Linux x86-64
>            Reporter: Bogdan Bezpartochnyy
>              Labels: patch
>         Attachments: Main.java
>
>
> Firstly I would like to point out that I'm not very proficient in linear algebra, but
in my opinion the following behavior should not occur. When I solve the following linear system
by hand it has no solution, but in commons math using QRDecomposition it outputs  x1= 7.5
x2 = 5.5



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message