tol论证在QR分解中的作用

ros*_*ose 3 r

我在R.新用户能否请你告诉我,或引进一些refrences其描述tol在计算R A QR分解的说法?

例如,这两行的区别是什么:

qr(A, tol=1e-07) #Doesn't work

qr(A, tol=1e-20) #Works
Run Code Online (Sandbox Code Playgroud)

为什么我得到我想要的resullt这么小的值tol,但没有更大的值?

42-*_*42- 5

所述tol参数控制是否qr将返回一个值或不取决于列是否已被判断为是线性相关的列.我认为将tol值降低到1e-16以下将会破坏该检查的目的.(这几乎是双精度数学中零的实用定义.)

首先看一下qr.default然后找到FORTRAN代码:

http://svn.r-project.org/R/trunk/src/appl/dqrdc2.f

这是描述逻辑的FORTRAN例程的注释:

c     cycle the columns from l to p left-to-right until one
c     with non-negligible norm is located.  a column is considered
c     to have become negligible if its norm has fallen below
c     tol times its original norm.  the check for l .le. k
c     avoids infinite cycling.
Run Code Online (Sandbox Code Playgroud)