找回密码
 注册
查看: 2091|回复: 0

R语言:rcond()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 18:48:58 | 显示全部楼层 |阅读模式
rcond(Matrix)
rcond()所属R语言包:Matrix

                                        Estimate the Reciprocal Condition Number
                                         估计互惠的条件数

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Estimate the reciprocal of the condition number of a matrix.
估计矩阵的条件数的倒数。

This is a generic function with several methods, as seen by showMethods(rcond).
这是一个泛型函数的几种方法,如showMethods(rcond)。


用法----------Usage----------


rcond(x, norm, ...)

## S4 method for signature 'sparseMatrix,character'
rcond(x, norm, useInv=FALSE, ...)



参数----------Arguments----------

参数:x
an R object that inherits from the Matrix class.
一个RMatrix类继承的对象。


参数:norm
Character indicating the type of norm to be used in the estimate. The default is "O" for the 1-norm ("O" is equivalent to "1").  The other possible value is "I" for the infinity norm, see also norm.  
字符表示的估计要使用规范的类型。默认是"O"1规范("O"是"1")。其他可能的值是"I"无穷规范,也见norm。


参数:useInv
logical (or "Matrix" containing solve(x)).  If not false, compute the reciprocal condition number as 1/(||x|| * ||x^(-1)||), where x^(-1) is the inverse of x, solve(x).  This may be an efficient alternative (only) in situations where solve(x) is fast (or known), e.g., for (very) sparse or triangular matrices.  Note that the result may differ depending on useInv, as per default, when it is false, an approximation is computed.  
逻辑(或"Matrix"含solve(x))。如果不是假的,计算互惠的条件数为1/(||x|| * ||x^(-1)||),其中x^(-1)x,solve(x)的逆。这可能是一种有效的替代的情况下(只)solve(x)快(或已知),例如:(非常)稀疏三角矩阵。注意useInv,按默认,当它是假的,近似计算,其结果可能会有所不同而异。


参数:...
further arguments passed to or from other methods.
通过进一步的论据或其他方法。


值----------Value----------

An estimate of the reciprocal condition number of x.
x互惠条件数的估计。


背景----------BACKGROUND----------

The condition number of a regular (square) matrix is the product of the norm of the matrix and the norm of its inverse (or pseudo-inverse).
定期(平方米)矩阵的条件数是norm矩阵和其逆(或伪逆)规范的产品。

More generally, the condition number is defined (also for non-square matrices A) as
更普遍,条件数的定义(也非方阵A)

Whenever x is not a square matrix, in our method definitions, this is typically computed via rcond(qr.R(qr(X)), ...) where X is x or t(x).
每当x是不是一个方阵,在我们的方法定义,这通常是通过rcond(qr.R(qr(X)), ...)计算X是x或t(x)。

The condition number takes on values between 1 and infinity, inclusive, and can be viewed as a factor by which errors in solving linear systems with this matrix as coefficient matrix could be magnified.
条件数的值介于1和无穷大,包容性,可以为解决这个矩阵为系数矩阵的线性系统的错误可能会被放大的因素看。

rcond() computes the reciprocal condition number 1/κ with values in [0,1] and can be viewed as a scaled measure of how close a matrix is to being rank deficient (aka “singular”).
rcond()计算互惠条件数值1/κ,并且可以作为一个矩阵亏秩(又名“奇异”)如何密切规模措施[0,1]。

Condition numbers are usually estimated, since exact computation is costly in terms of floating-point operations.  An (over) estimate of reciprocal condition number is given, since by doing so overflow is avoided.  Matrices are well-conditioned if the reciprocal condition number is near 1 and ill-conditioned if it is near zero.
通常条件数估计,精确计算,因为是在浮点运算方面付出高昂代价。互惠条件数(以上)的估计,因为这样做可以避免溢出。矩阵的空调如果互惠条件数的近1和病态,如果它是接近零。


参考文献----------References----------

Matrix Computations, 2nd edition, Johns Hopkins, Baltimore.

参见----------See Also----------

norm, kappa() from package base computes an approximate condition number of a “traditional” matrix, even non-square ones, with respect to the p=2 (Euclidean) norm. solve.
norm,kappa()包basep=2(欧几里德)尊重“传统”的矩阵,甚至非正方形的近似条件数计算, norm。 solve。

condest, a newer approximate estimate of the (1-norm) condition number, particularly efficient for large sparse matrices.
condest,一个新的条件(1规范)的数量,特别是大型稀疏矩阵的高效近似的估计。


举例----------Examples----------


x <- Matrix(rnorm(9), 3, 3)
rcond(x)
## typically "the same" (with more computational effort):[#典型的“相同”(更多的计算):]
1 / (norm(x) * norm(solve(x)))
rcond(Hilbert(9))  # should be about 9.1e-13[应该9.1e-13]

## For non-square matrices:[#对于非方阵:]
rcond(x1 &lt;- cbind(1,1:10))# 0.05278[0.05278]
rcond(x2 &lt;- cbind(x1, 2:11))# practically 0, since x2 does not have full rank[几乎0,因为X2没有完全排名]

## sparse[#稀疏]
(S1 <- Matrix(rbind(0:1,0, diag(3:-2))))
rcond(S1)
m1 <- as(S1, "denseMatrix")
all.equal(rcond(S1), rcond(m1))

## wide and sparse[#宽和稀疏]
rcond(Matrix(cbind(0, diag(2:-1))))

## Large sparse example ----------[#大型稀疏例如----------]
m <- Matrix(c(3,0:2), 2,2)
M <- bdiag(kronecker(Diagonal(2), m), kronecker(m,m))
36*(iM &lt;- solve(M)) # still sparse[仍然稀疏]
MM <- kronecker(Diagonal(10), kronecker(Diagonal(5),kronecker(m,M)))
dim(M3 &lt;- kronecker(bdiag(M,M),MM)) # 12'800 ^ 2[12800 ^ 2]
if(interactive()) ## takes about 2 seconds[#约需2秒]
  system.time(r <- rcond(M3))
## whereas this is *fast* even though it computes  solve(M3)[#而这是*快*即使计算解决数(M3)]
system.time(r. <- rcond(M3, useInv=TRUE))
if(interactive()) ## the values are not the same[#的值是不一样的]
  c(r, r.)  # 0.05555 0.013888[0.05555 0.013888]


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-24 01:30 , Processed in 0.036016 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表