octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: matrix_type check


From: David Bateman
Subject: Re: matrix_type check
Date: Fri, 25 Apr 2008 10:21:07 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080306)

Jaroslav Hajek wrote:
> I'm not sure I understand. If this check succeeds, but Cholesky
> factorization fails,
> then the matrix is rank-deficient or has negative eigenvalues (yes,
> that can also happen).
> But it is much harder to create a matrix that is misclassified by this
> check - you can try.
> With the old check, just do
> A = rand(10); A = A + A';
> matrix_type (A)
> chol(A)
>   
Currently the mldivide operator on a matrix flagged as positive definite
will do the following

* Attempt Cholesky factorization
* If that fails attempt LU factorization
* If that fails attempt a minimum norm solution

I was wondering if the second step should be removed. Of course, it was
a stupid question on my part... Your check can't see if there are
negative eigenvalues, and so the fallback to an LU factorization should
be kept.

>>  If so then the current factorization code should also be changed such
>>  that a failing Choleksy factorization falls back to a minimum norm
>>  solution rather than first trying an LU solution.
>>
>>     
>
> Ah, now I get it. No, I don't think so. I think that the test can
> still pass even for a regular matrix with negative eigenvalues. It is
> an interesting question though - I'll try to research this a little,
> perhaps your guess is right.
>   
I'm no longer sure unless you we can guarantee that a failing Cholesky
factorization is due to a rank deficient matrix rather than negative
eigenvalues. I suppose we should check for symmetric definite matrices
as well and use DSYTRF and ZHETRF to do the factorization.

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]