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

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

[复制链接]
发表于 2012-2-16 20:23:39 | 显示全部楼层 |阅读模式
kappa(base)
kappa()所属R语言包:base

                                        Compute or Estimate the Condition Number of a Matrix
                                         计算或估计矩阵的条件数

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

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

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), and hence depends on the kind of matrix-norm.
定期(平方米)矩阵的条件数是矩阵和其逆(或伪逆),规范的标准的产品,因此对矩阵范数的一种依赖。

kappa() computes by default (an estimate of) the 2-norm condition number of a matrix or of the R matrix of a QR decomposition, perhaps of a linear fit.  The 2-norm condition number can be shown to be the ratio of the largest to the smallest non-zero singular value of the matrix.
kappa()计算(估计)默认情况下,2  - 范数的条件数矩阵或R分解矩阵QR线性拟合,或许。 2规范的条件数可以被证明是最大的比例最小的非零矩阵的奇异值。

rcond() computes an approximation of the reciprocal condition number, see the details.
rcond()近似计算互惠的条件数,看到的细节。


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


kappa(z, ...)
## Default S3 method:[默认方法]
kappa(z, exact = FALSE,
      norm = NULL, method = c("qr", "direct"), ...)
## S3 method for class 'lm'
kappa(z, ...)
## S3 method for class 'qr'
kappa(z, ...)

kappa.tri(z, exact = FALSE, LINPACK = TRUE, norm=NULL, ...)

rcond(x, norm = c("O","I","1"), triangular = FALSE, ...)



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

参数:z,x
A matrix or a the result of qr or a fit from a class inheriting from "lm".
矩阵或一个qr或从一个类继承从"lm"适合的结果。


参数:exact
logical.  Should the result be exact?
逻辑。应的结果准确吗?


参数:norm
character string, specifying the matrix norm with respect to which the condition number is to be computed, see also norm.  For rcond, the default is "O", meaning the One- or 1-norm.  The (currently only) other possible value is "I" for the infinity norm.
字符串,指定矩阵范数,条件数计算,也看到norm。 rcond,默认是"O",这意味着一个或1规范。 (目前唯一)其他可能的值是"I"无穷规范。


参数:method
character string, specifying the method to be used; "qr" is default for back-compatibility, mainly.
字符串,指定要使用的方法; "qr"是默认情况下,主要向后兼容性。


参数:triangular
logical.  If true, the matrix used is just the lower triangular part of z.
逻辑。如果情况属实,使用矩阵只是较低z三角的一部分。


参数:LINPACK
logical.  If true and z is not complex, the Linpack routine dtrco() is called; otherwise the relevant Lapack routine is.
逻辑。如果真正和z并不复杂的Linpack例行dtrco()被称为否则有关LAPACK例程。


参数:...
further arguments passed to or from other methods; for kappa.*(), notably LINPACK when norm is not "2".
进一步的参数传递或其他方法;kappa.*(),尤其是LINPACK时norm不"2"。


Details

详情----------Details----------

For kappa(), if exact = FALSE (the default) the 2-norm condition number is estimated by a cheap approximation. Following S, by default, this uses the LINPACK routine dtrco(). However, in R (or S) the exact calculation (via svd) is also likely to be quick enough.
kappa()如果exact = FALSE(默认)2  - 范数的条件数是一种廉价的近似估计。后续的s,默认情况下,使用的LINPACK例行dtrco()。然而,在R(或S)的精确计算(通过svd)也可能是速度不够快。

Note that the 1- and Inf-norm condition numbers are much faster to calculate, and rcond() computes these reciprocal condition numbers, also for complex matrices, using standard Lapack routines.
注意:1  - 和INF-范数的条件数,更快的计算,和rcond()这些互惠条件数计算,也为复杂的矩阵,使用标准的LAPACK例程。

kappa and rcond are different interfaces to partly identical functionality.
kappa和rcond不同的接口部分相同的功能。

kappa.tri is an internal function called by kappa.qr.
kappa.tri是kappa.qr称为内部功能。


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

The condition number, kappa, or an approximation if exact = FALSE.
条件数,kappa如果exact = FALSE或近似。


作者(S)----------Author(s)----------



The design was inspired by (but differs considerably from)
the S function of the same name described in Chambers (1992).




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

Linear models. Chapter 4 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.

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

norm; svd for the singular value decomposition and qr for the QR one.
norm;svd奇异值分解和qrQR独。


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


kappa(x1 <- cbind(1,1:10))# 15.71[15.71]
kappa(x1, exact = TRUE)        # 13.68[13.68]
kappa(x2 <- cbind(x1,2:11))# high! [x2 is singular!][高! [X2是单数!]

hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1, i, "+") }
sv9 <- svd(h9 <- hilbert(9))$ d
kappa(h9)# pretty high![相当高!]
kappa(h9, exact = TRUE) == max(sv9) / min(sv9)
kappa(h9, exact = TRUE) / kappa(h9) # .677 (i.e., rel.error = 32%)[0.677(即rel.error = 32%)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-24 14:32 , Processed in 0.021170 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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