【问题标题】:How to find singular matrix eigenvector?如何找到奇异矩阵特征向量?
【发布时间】:2013-05-21 14:22:14
【问题描述】:

我有一个 800x800 奇异(协方差)矩阵,我想找到它的最大特征值和与该特征值对应的特征向量。 有谁知道是否可以用 R 来做到这一点?

【问题讨论】:

  • eigen函数(例如result$values[1]result$vectors[,1]
  • @Marcinthebox,它不适用于奇异矩阵
  • 好吧,我猜是开枪了。您可能想提供一个小例子。也许svd 会找到eigen 没有的解决方案。
  • @Marcinthebox,找不到如何使用 swd 解决我的问题

标签: r eigenvector eigenvalue


【解决方案1】:

以下是使用svd 分解协方差矩阵的示例:

a <- matrix(runif(16),4)
C <- cov(a)
res <- svd(C)
res
res$d[1] # largest singular value
res$u[,1] # largest vector ; u and v are the same

希望对您有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-29
    • 1970-01-01
    • 2019-04-27
    • 2018-10-12
    • 1970-01-01
    • 2011-09-29
    相关资源
    最近更新 更多