Re: Damped least square




In article <1192483246.350710.82320@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
joodukjin@xxxxxxxxx writes:
On Oct 12, 8:46 am, spellu...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(Peter Spellucci) wrote:
In article <1192145013.407510.52...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, jooduk...@xxxxxxxxx writes:

>On Oct 11, 10:33 am, Hans Mittelmann <mittelm...@xxxxxxx> wrote:
>> On Oct 10, 3:30 pm, jooduk...@xxxxxxxxx wrote:
>>
>> > hi
>>
>> > to solve for Ax=b, I want to use Damped least square method.
>>
>> > A : M x N M>>N,
>> > b: M x1
>> > A and b : Known
>>
>> > Does somebody know the matlab function or code for Damped least square
>> > method?
>>
>> > Please let me know
>>
>> Hi,
>> the LSQR that Peter pointed to is in the general Matlab not in the
>> optimization toolbox. Just say help lsqr.
>> Hans
>
>M is close to singular when I use least square method.
A???

>any other method to prevent singularity? how is it going if damped
>square method is used?
>
>thank you for your answers
>

something like
min_x ||Ax-b||^2+lambda*||D*x||^2
for "properly" chosen lambda and some weighting matrix D,
in the simplest case D=unit matrix.
this si equivalent to solving
min_x ||Ax-b||^2 subject to ||Dx||^2 <= delta
where delta depends on lambda and vice versa lambda depends on delta.

if you insist in working in matlab, then
pinv(A)*b
gives you the unique least squares solution with minimal norm.
if this is not adequate then you might use SVD and replace the too small nonzero
singular values by some appropriate value >0.
if M and N are large, then lsqr will be the right choice:
it proceeds iteratively and you can stop if the residual is sufficinetly small.
this works indirectly as if the problem had been regularized.

hth
peter

Thank peter so much

Ax=B

My case is that A is close to singularity. Damped least square was
used.
But no difference between x by Least square and x by Damped least
square was made. Is it possible?


yes, if you require the residual becoming very small

I think Damped least squre should provide more reasonable values
rather than Least square method.

Why is no difference coming?

is there any good regulariztion for ill-conditioned A except Least and
Damped least square?

thank u so much



you could try a trick yourself:
append a small multiple of the unit matrix to "A" and correspondingly many zeros
to b and try again. This means you minimize
||Ax-b||^2 + lambda^2*||x||^2
with respect to x. the new matrix will not be close to singualr if , say, you
take lambda = 10^{-4}

hth
peter

.



Relevant Pages

  • Re: Damped least square
    ... (Peter Spellucci) ... >>> Does somebody know the matlab function or code for Damped least square ... >M is close to singular when I use least square method. ...
    (sci.math.num-analysis)
  • Re: Damped least square
    ... (Peter Spellucci) ... Just say help lsqr. ... where delta depends on lambda and vice versa lambda depends on delta. ... Damped least square was ...
    (sci.math.num-analysis)
  • Re: Solving equations
    ... that solving by least square method might be the best option ... Now solving the equations below simultaneously using least ... square method will give me the point. ... ssq is a sum of squares of residuals, ...
    (comp.soft-sys.matlab)
  • Re: Simulation using Embedded MATLAB Function block in Simulink
    ... > Coder warning: Function resolved in the MATLAB workspace and will ... > only be called during simulation.Function 'Embedded MATLAB Function' ... This error occurs because SQUARE, unlike SIN, is not part of the Embedded ... Simulink knows what size the output is. ...
    (comp.soft-sys.matlab)
  • lsqcurvefit in C
    ... I have a problem with the computation time of lsqcurvefit in Matlab. ... I perform a least square minimization over a set of p vectors in ... Hence i wanted to implement Least square ... libraries deal with sets of Vectors but only sets of nx1 points. ...
    (comp.soft-sys.matlab)