Re: [eigen] Re: LU precision tuning

```On Mon, 11 May 2009, Benoit Jacob wrote:

```
```I have no experience with QR so I don't realize how much pivoting is
essential or not for QR. So I can't answer right away the following
important questions:
- what is the domain of application of a no-pivoting QR? Is it
restricted to only invertible matrices or something like that?
(the fact that our unittest passes doesn't say much on precision, as
our tests use a very low precision)
- how  would the domain of application be expanded if we added partial
(column) pivoting?
```
```
```
Since nobody replied, I thought perhaps I could say what I know even though I don't have any practical experience.
```
```
One important application of QR is to solve least squares problems. That is, given an overdetermined system Ax = b, find the vector x which minimizes the Euclidean norm of the residual Ax - b. As I understand it (and the situation is probably more complicated), QR without pivoting works fine if A is full rank, but you need column pivoting if A is (nearly) rank deficient. Remember that A is rectangular, so full rank is not the same as invertible.
```
```
I remember there was a recent post about the least squares module, but I can't find it anymore. However, the SVN log shows that linearRegression() used to solve the least squares problem via normal equation A*Ax = A*b. That's another approach, which is faster than QR but less stable. It now calls fitHyperplane(), which actually solves another problem: total least squares instead of (ordinary) least squares. That seems a rather big change.
```
Cheers,
Jitse

```

 Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/