Jama的特征值分解函数问题 [英] Issue with Jama's Eigenvalue decomposition function

查看:133
本文介绍了Jama的特征值分解函数问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 matrix.eig()时,我得到了一个错误的特征向量(也通过多次运行检查以确定)。矩阵是:

I am getting a wrong eigen-vector (also checked by running multiple times to be sure) when i am using matrix.eig(). The matrix is:

1.2290 1.2168 2.8760 2.6370 2.2949 2.6402
1.2168 0.9476 2.5179 2.1737 1.9795 2.2828
2.8760 2.5179 8.8114 8.6530 7.3910 8.1058
2.6370 2.1737 8.6530 7.6366 6.9503 7.6743
2.2949 1.9795 7.3910 6.9503 6.2722 7.3441 
2.6402 2.2828 8.1058 7.6743 7.3441 7.6870

该函数返回特征向量:

-0.1698  0.6764  0.1442 -0.6929 -0.1069  0.0365
-0.1460  0.6478  0.1926  0.6898  0.0483 -0.2094
-0.5239  0.0780 -0.5236  0.1621 -0.2244  0.6072
-0.4906 -0.0758 -0.4573 -0.1279  0.2842 -0.6688
-0.4428 -0.2770  0.4307  0.0226 -0.6959 -0.2383
-0.4884 -0.1852  0.5228 -0.0312  0.6089  0.2865

Matlab给出相同输入的以下特征向量:

Matlab gives the following eigen-vector for the same input:

0.1698 -0.6762 -0.1439  0.6931  0.1069  0.0365
0.1460 -0.6481 -0.1926 -0.6895 -0.0483 -0.2094
0.5237 -0.0780  0.5233 -0.1622  0.2238  0.6077
0.4907  0.0758  0.4577  0.1278 -0.2840 -0.6686
0.4425  0.2766 -0.4298 -0.0227  0.6968 -0.2384
0.4888  0.1854 -0.5236  0.0313 -0.6082  0.2857

matlab和jama的特征值是匹配的,但是特征向量前5列符号相反,只有最后一列是准确的。

The eigen-values for matlab and jama are matching but eigen-vectors the first 5 columns are reversed in sign and only the last column is accurate.

输入的类型是否有任何问题 Jama.Matrix.EigenvalueDecomposition.eig()
接受或任何其他问题?请告诉我如何修复错误。在此先感谢。

Is there any issue on the kind of input that Jama.Matrix.EigenvalueDecomposition.eig() accepts or any other problem with the same? Please tell me how i can fix the error. Thanks in advance.

推荐答案

此处没有错误,两个结果都是正确的 - 正如任何其他标量乘以特征向量一样。

There is no error here, both results are correct - as is any other scalar times the eigen vectors.

有无数个特征向量可以工作 - 它只是大多数软件程序报告长度为1的向量的惯例。 Jama报告的特征向量等于Matlab的-1倍可能只是他们使用的算法的一个人工产物。

There are an infinite number of eigen vectors that work - its just convention that most software programs report the vectors that have length of one. That Jama reports eigen vectors equal to -1 times those of Matlab is probably just an artifact of the algorithm they used.

这篇关于Jama的特征值分解函数问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆