简体   繁体   English

R中此矩阵的本征分析

[英]Eigen Analysis of this matrix in R

在此处输入图片说明

I'm doing eigen analysis of given matrix P in R . 我正在对R中给定矩阵P进行特征分析。 My MWE is 我的MWE是

Minimum working example 最低工作示例

P <-
 matrix(
  data=
    c(
        1, 0, 0, 0
      , 0.4, 0, 0.6, 0
      , 0.2, 0, 0.1, 0.7
      , 0, 0, 0, 1
      )
   , nrow=4
   , ncol=4
   , byrow=TRUE
   )

SPD <- eigen(P)
round(SPD$values, 3)
round(SPD$vectors, 3)

SVD <- svd(P)
round(SVD$d, 3)
round(SVD$u, 3)
round(SVD$v, 3)

Output 产量

[1] 1.0 1.0 0.1 0.0


      [,1]  [,2]  [,3] [,4]
[1,] 0.866 0.000 0.000    0
[2,] 0.462 0.346 0.986    1
[3,] 0.192 0.576 0.164    0
[4,] 0.000 0.741 0.000    0

[1] 1.253 1.093 0.543 0.000


       [,1]   [,2]   [,3]   [,4]
[1,] -0.349  0.784 -0.502  0.108
[2,] -0.210  0.440  0.863  0.134
[3,] -0.577 -0.117  0.045 -0.807
[4,] -0.708 -0.422 -0.045  0.565


       [,1]   [,2]   [,3] [,4]
[1,] -0.438  0.857 -0.272    0
[2,]  0.000  0.000  0.000    1
[3,] -0.147  0.231  0.962    0
[4,] -0.887 -0.461 -0.024    0

For some reasons I'm not able to reproduce the results given the fig attached. 由于某些原因,鉴于所附的无花果,我无法重现结果。 Am I missing something here? 我在这里想念什么吗?

Your author seems to want to solve for the left eigenvectors. 您的作者似乎想求解左特征向量。 Since P is not symmetric, the matrix of left eigenvectors is not just the transpose of the matrix of right eigenvectors. 由于P不是对称的,所以左特征向量的矩阵不仅仅是右特征向量的矩阵的转置。 The left eigenvectors are found as the eigenvectors of the transpose of P. See Wolfram http://mathworld.wolfram.com/Eigenvector.html . 发现左特征向量作为P的转置特征向量。请参见Wolfram http://mathworld.wolfram.com/Eigenvector.html You can reproduce your author's example by using 您可以通过使用复制您的作者的示例

v <- eigen(t(P))$vectors

which gives the left eigenvectors of P as the transpose of v, namely 给出P的左特征向量作为v的转置

t(v)
           [,1]     [,2]       [,3]       [,4]
[1,]  1.0000000 0.000000  0.0000000  0.0000000
[2,]  0.0000000 0.000000  0.0000000  1.0000000
[3,] -0.1727737 0.000000  0.7774816 -0.6047079
[4,]  0.1075984 0.134498 -0.8069883  0.5648918

After renormalizing rows 3 and 4 of the t(v), you get the author's result. 在对t(v)的第3行和第4行重新规范化之后,您将获得作者的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM