Default rank revealing tolerance

조회 수: 10 (최근 30일)
Bruno Luong
Bruno Luong 2024년 2월 16일
댓글: Paul 2024년 2월 17일
In few MATLAB functions such as RANK, PINV, ORTH there is a parameter TOL.
MATLAB uses the default value as
% tol = max(size(A)) * eps(norm(A))
where A the matrix under study.
I have two quetions:
First question: what is the theoretical basis of such formula? Especially why the max(size(A)) factor?
In my simple test here, it seems the error or the singular value grows like a square root of the dimension m. Here is the script to create a matrix A of size m x 4 of rank 3. I use SVD to compute the singulars values, s(4) ideally should be 0, s1(1:3) about unity, but I see experimentally s(4) grow like sqrt(m) as showed in this script:
m0 = 1e5;
s4 = [];
m = [];
while m0 < 1e8
[Q, ~] =qr(rand(m0,3),0);
X = rand(3,4);
A = Q * X;
[~,s,~] = svd(A,0,'vector');
s4(end+1) = s(4);
m(end+1) = m0;
m0 = ceil(m0*1.1);
end
P = polyfit(log(m),log(s4),1);
p = P(1);
c=exp(P(2));
figure
loglog(m, s4);
hold on
h = loglog(m, c*m.^p);
xlabel('m')
ylabel('s(4)')
legend(h, sprintf('%g*m^{%g}', c, p))
PS: There is a floor noise about 1e-16 for m < 1e5, that could affect the fit, so I take the m value above 1e5 up to 1e8 .
Intuitively the square-root relationship seems reasonable to me since we could consider truncation errors in each component are somewhat random and independent.
Second question. The function lsqminnorm also have a default tol but is it NOT specified beside telling it computed from QR decomposition. It describes how the rank k is used to approximate the solution, but I don't see how the tol value is defined to estimate in turn the rank k. I would expect something like
% tol = eps(abs(R(1,1))) * max(size(A));
where R is the triangular matrix returned by qr, meaning abs(R(1,1)) = max(vecnorm(A)).
Can someone (TMW staff) shed a light and give the method to determine the default tol value implemented within lsqminnorm?
  댓글 수: 8
Bruno Luong
Bruno Luong 2024년 2월 17일
편집: Bruno Luong 2024년 2월 17일
https://core.ac.uk/download/pdf/216041984.pdf Lemme 4.2, for definition of modestly growing
Paul
Paul 2024년 2월 17일
Thanks for the links. I checked the LINPACK User's Guide from siam.org and I didn't see the TMW formula in Chapter 11, Section 1 (at least not explicitly).

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by