On Jun 22, 2012, at 2:54 AM, Alexander Grayver wrote:

> Hi Barry,
> 
>>> In this case the application of the method is quite restricted since all 
>>> practical least squares problems formulated in form of normal equations are 
>>> solved with regularization, e.g.:
>>> 
>>> (A'A + \lamba I)x = A'b
>> Yes it is restrictive. There is no concept of lambda in CGNE in PETSc
> 
> In this case, since there is LSQR in PETSc, there is hardly any reason to use 
> CGNE.
> 
>>> Assume I have A computed and use matrix free approach to represent (A'A + 
>>> \lamba I) without ever forming it, so what should I do then to apply 
>>> KSPCGNE?
>>    If you supply a shell matrix that applies (A'A + \lamba I)  why not just 
>> use KSPCG?
> 
> That is what I do at the moment. However, as far as I understand, CGLS is not 
> just about shifting original matrix with some lambda, it has other advantages 
> over CG for normal equations.

   Ok, then it is an algorithm that is not currently implemented in PETSc. 

    CGNE is only for people who have A (which is square) and want to solve the 
normal equations with CG using the preconditioner of A and its transpose for 
the preconditioner. Basically it allows the user to avoid computing A'A 
explicitly or making their own shell matrix.  It is definitely not a substitute 
for LSQR.


    Barry

> 
>>     But if you provide this shell matrix, how do you plan to apply a 
>> preconditioner?
> 
> One can easily compute diag(A'A + \lamba I), thanks to MatGetColumnNorms, and 
> thus Jacobi is possible. Since the matrix is diagonally dominant, in my case 
> it is enough to converge. Although convergence for normal equations does not 
> imply accurate solution, so that one needs CGLS or LSQR.
> 
> -- 
> Regards,
> Alexander
> 

Reply via email to