eigen(base)
eigen()所属R语言包:base
Spectral Decomposition of a Matrix
矩阵的谱分解
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes eigenvalues and eigenvectors of real (double, integer, logical) or complex matrices.
实时(双整数,逻辑)或复杂的矩阵计算特征值和特征向量。
用法----------Usage----------
eigen(x, symmetric, only.values = FALSE, EISPACK = FALSE)
参数----------Arguments----------
参数:x
a matrix whose spectral decomposition is to be computed.
要计算一个矩阵的谱分解。
参数:symmetric
if TRUE, the matrix is assumed to be symmetric (or Hermitian if complex) and only its lower triangle (diagonal included) is used. If symmetric is not specified, the matrix is inspected for symmetry.
如果TRUE矩阵假设是对称的(厄米特如果复杂的),只有它的下三角(包括对角线)。 symmetric如果不指定,检查为对称矩阵。
参数:only.values
if TRUE, only the eigenvalues are computed and returned, otherwise both eigenvalues and eigenvectors are returned.
如果TRUE,只有特征值计算并返回,否则返回的特征值和特征向量。
参数:EISPACK
logical. Should EISPACK be used (for compatibility with R < 1.7.0)?
逻辑。应EISPACK(与R <1.7.0兼容)?
Details
详情----------Details----------
By default eigen uses the LAPACK routines DSYEVR, DGEEV, ZHEEV and ZGEEV whereas eigen(EISPACK = TRUE) provides an interface to the EISPACK routines RS, RG, CH and CG.
默认情况下eigen使用LAPACK例程DSYEVR,DGEEV,ZHEEV和ZGEEV而eigen(EISPACK = TRUE)提供了一个接口的EISPACK例程RS,RG,CH和 CG。
If symmetric is unspecified, the code attempts to determine if the matrix is symmetric up to plausible numerical inaccuracies. It is faster and surer to set the value yourself.
symmetric如果是不确定的,代码的尝试,以确定是否矩阵是对称的到合理的数值不准确。这是更快和更可靠的设置自己的价值。
eigen is preferred to eigen(EISPACK = TRUE) for new projects, but its eigenvectors may differ in sign and (in the asymmetric case) in normalization. (They may also differ between methods and between platforms.)
eigen是首选eigen(EISPACK = TRUE)新项目,但其特征值可能不同正常化标志,(在不对称的情况下)。 (他们也可能不同的方法和平台之间。)
Computing the eigenvectors is the slow part for large matrices.
计算特征向量是缓慢的大型矩阵的一部分。
Computing the eigendecomposition of a matrix is subject to errors on a real-world computer: the definitive analysis is Wilkinson (1965). All you can hope for is a solution to a problem suitably close to x. So even though a real asymmetric x may have an algebraic solution with repeated real eigenvalues, the computed solution may be of a similar matrix with complex conjugate pairs of eigenvalues.
计算矩阵的特征分解,是一个真正的世界计算机上的错误:权威的分析是威尔金森(1965)。你可以希望的是一个解决问题的办法,适当关闭x。因此,即使一个真正的不对称x可能有一个反复的实特征值的代数解法,计算解决方案可能类似矩阵特征值的复共轭对。
值----------Value----------
The spectral decomposition of x is returned as components of a list with components
x谱分解返回列表组件与组件
参数:values
a vector containing the p eigenvalues of x, sorted in decreasing order, according to Mod(values) in the asymmetric case when they might be complex (even for real matrices). For real asymmetric matrices the vector will be complex only if complex conjugate pairs of eigenvalues are detected.
矢量p x特征值Mod(values),依次排序,按在不对称的情况下时,他们可能是复杂的(甚至为实矩阵)。真正的非对称矩阵的向量将是复杂的,只有特征值的复共轭对被检测。
参数:vectors
either a p * p matrix whose columns contain the eigenvectors of x, or NULL if only.values is TRUE. For eigen(, symmetric = FALSE, EISPACK =TRUE) the choice of length of the eigenvectors is not defined by EISPACK. In all other cases the vectors are normalized to unit length. Recall that the eigenvectors are only defined up to a constant: even when the length is specified they are still only defined up to a scalar of modulus one (the sign for real matrices).
p * p列包含x或NULL如果only.values是TRUE的特征向量矩阵。 eigen(, symmetric = FALSE, EISPACK =TRUE)选择的特征向量的长度不由EISPACK定义。在所有其他情况下,单位长度向量归。记得特征向量只定义了一个常量,甚至指定长度时,他们仍然只定义了一个标模(实矩阵的符号)。
If r <- eigen(A), and V <- r$vectors; lam <- r$values,
如果r <- eigen(A)和V <- r$vectors; lam <- r$values,
(up to numerical fuzz), where Lmbd =diag(lam).
(数值模糊),Lmbd = diag(lam)。
参考文献----------References----------
The New S Language. Wadsworth & Brooks/Cole.
Klema, V., and Moler, C. B. (1976). Matrix Eigensystems Routines – EISPACK Guide. Springer-Verlag Lecture Notes in Computer Science 6.
LAPACK Users' Guide. Third Edition. SIAM.<br> Available on-line at http://www.netlib.org/lapack/lug/lapack_lug.html.
Clarendon Press, Oxford.
参见----------See Also----------
svd, a generalization of eigen; qr, and chol for related decompositions.
svd,概括了eigen;qr,chol相关分解。
To compute the determinant of a matrix, the qr decomposition is much more efficient: det.
计算矩阵的行列式,qr分解为更有效的:det。
举例----------Examples----------
eigen(cbind(c(1,-1),c(-1,1)))
eigen(cbind(c(1,-1),c(-1,1)), symmetric = FALSE)
# same (different algorithm).[相同(不同的算法)。]
eigen(cbind(1,c(1,-1)), only.values = TRUE)
eigen(cbind(-1,2:1)) # complex values[复杂的值]
eigen(print(cbind(c(0,1i), c(-1i,0))))# Hermite ==> real Eigen values[厄米==>真正的特征值]
## 3 x 3:[#3×3:]
eigen(cbind( 1,3:1,1:3))
eigen(cbind(-1,c(1:2,0),0:2)) # complex values[复杂的值]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|