Re: [ojAlgo-user] Eigenvalue Decomposition Problem
Mathematics, linear algebra and optimisation
Brought to you by:
apete
|
From: Anders P. <ap...@op...> - 2006-11-19 12:08:52
|
I setup a unit test with the matrix you supplied - don't see a problem.
PrimitiveEigenvalue, JamaEigenvalue & ColtEigenvalue all compute correct
decompositions.
You need to test/compare [A][V] = [V][D] and not (as you suggested)
[A][V] = [D][V].
To create a matrix:
BasicMatrix tmpMatrix = PrimitiveMatrix.FACTORY.build(new double[][] { {
9.28, 0.48, -2.72, 1.28, -8.32 }, { 4.48, 0.68, -6.52, 2.48, -1.12 }, {
-8.32, -0.12, 8.68, -2.32, 2.08 }, { 7.68, 0.88, -10.32, 3.68, -1.92 },
{ -13.12, -1.92, 10.88, -5.12, 9.28 } });
or
Array2Dim<Double> tmpArray = Array2Dim.makePrimitive(5, 5);
for(i = 0 ... 4){
for(j = 0... 4) {
tmpArray.set(i,j, ?);
}}
BasicMatrix tmpMatrix = new PrimitiveMatrix(tmpArray);
The you do:
Eigenvalue tmpDecomposition = new PrimitiveEigenvalue();
tmpDecomposition.compute(tmpMatrix);
/Anders
mi...@vt... wrote:
> I am trying to compute the eigenvectors of a matrix. For some reason several
> java matrix packages (Jama, Colt, Mtj) compute eigenvectors (V) for this matrix
> (A) that do not satisfy the equation AV = XV and therefore are incorrect. As a
> result of this problem, I am trying to use the ojalgo package to compute the
> eigenvectors to see if its results are any different. However, I am relatively
> new to OO programing and I can't figure out how to use the matrix decomposition
> interfaces.
>
> The matrix is:
> 9.28 0.48 -2.72 1.28 -8.32
> 4.48 0.68 -6.52 2.48 -1.12
> -8.32 -0.12 8.68 -2.32 2.08
> 7.68 0.88 -10.32 3.68 -1.92
> -13.12 -1.92 10.88 -5.12 9.28
>
> 1.
> How do I use the ojgalgo matrix decomposition interfaces or where I can find
> an example of thier use?
>
> 2.
> Why is this matrix such a problem for the other java packages?
>
> Thank you in advance for any help that you can provide.
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> ojAlgo-user mailing list
> ojA...@li...
> https://lists.sourceforge.net/lists/listinfo/ojalgo-user
>
|