slanczos(mgcv)
slanczos()所属R语言包:mgcv
Compute truncated eigen decomposition of a symmetric matrix
计算截断对称矩阵的特征分解
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Uses Lanczos iteration to find the truncated eigen-decomposition of a symmetric matrix.
使用兰克泽斯迭代找到截断对称矩阵的特征分解。
用法----------Usage----------
slanczos(A,k=10,kl=-1,tol=.Machine$double.eps^.5)
参数----------Arguments----------
参数:A
A symmetric matrix.
一个对称矩阵。
参数:k
Must be non-negative. If kl is negative, then the k largest magnitude eigenvalues are found, together with the corresponding eigenvectors. If kl is non-negative then the k highest eigenvalues are found together with their eigenvectors and the kl lowest eigenvalues with eigenvectors are also returned.
必须非负。如果kl是否定的,那么被发现的的k最大的幅度特征值,以及相应的特征向量。 kl如果非负,则k最高的特征值与特征值和kl最低的特征值与特征向量也回来了。
参数:kl
If kl is non-negative then the kl lowest eigenvalues are returned together with their corresponding eigenvectors (in addition to the k highest eignevalues + vectors). negative kl signals that the k largest magnitude eigenvalues should be returned, with eigenvectors.
kl如果非负的kl最低的特征值,然后返回与他们对应的特征向量(除了k最高eignevalues +向量)一起。负kl,最大震级k特征值与特征向量,应返回的信号。
参数:tol
tolerance to use for convergence testing of eigenvalues. Error in eigenvalues will be less than the magnitude of the dominant eigenvalue multiplied by tol (or the machine precision!).
宽容为特征值的收敛性测试使用。在特征值的误差将小于幅度的主导特征值乘以tol(或机器精度!)。
Details
详情----------Details----------
If kl is non-negative, returns the highest k and lowest kl eigenvalues, with their corresponding eigenvectors. If kl is negative, returns the largest magnitude k eigenvalues, with corresponding eigenvectors.
kl如果非负,返回最高k“最低kl特征值,其相应的特征向量。 kl如果是负,返回最大震级k特征值,对应的特征向量。
The routine implements Lanczos iteration with full re-orthogonalization as described in Demmel (1997). Lanczos iteraction iteratively constructs a tridiagonal matrix, the eigenvalues of which converge to the eigenvalues of A, as the iteration proceeds (most extreme first). Eigenvectors can also be computed. For small k and kl the approach is faster than computing the full symmetric eigendecompostion. The tridiagonal eigenproblems are handled using LAPACK.
常规实现完全重新正交化Lanczos迭代在Demmel(1997)。兰克泽斯iteraction反复构造1三对角矩阵,其中收敛A,作为迭代收益(最极端的第一特征值)的特征值。也可以计算特征向量。对于小k和kl的做法是比计算的全对称eigendecompostion快。三对角线特征值问题的处理,使用的LAPACK。
The implementation is not optimal: in particular the inner triadiagonal problems could be handled more efficiently, and there would be some savings to be made by not always returning eigenvectors.
执行不是最优的,特别是内triadiagonal问题可以更有效地处理,会有一些储蓄并不总是返回特征向量。
值----------Value----------
A list with elements values (array of eigenvalues); vectors (matrix with eigenvectors in its columns); iter (number of iterations required).
values(阵列)的特征值的元素的列表,“vectors(矩阵特征向量在其列); iter(需要的迭代次数)。
作者(S)----------Author(s)----------
Simon N. Wood <a href="mailto:simon.wood@r-project.org">simon.wood@r-project.org</a>
参考文献----------References----------
参见----------See Also----------
cyclic.p.spline
cyclic.p.spline
举例----------Examples----------
## create some x's and knots...[#创建一些X和结...]
set.seed(1);
n <- 700;A <- matrix(runif(n*n),n,n);A <- A+t(A)
## compare timings of slanczos and eigen[#比较slanczos和特征的时序]
system.time(er <- slanczos(A,10))
system.time(um <- eigen(A,symmetric=TRUE))
## confirm values are the same...[#确认值是相同的...]
ind <- c(1:6,(n-3):n)
range(er$values-um$values[ind]);range(abs(er$vectors)-abs(um$vectors[,ind]))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|