Hello all again,
I stick to real symmetric matrices. I think the eigengen and eigensym use
different algorithms to compute eigenvectors that's why there might be
differences in sign for some eigenvectors.
I do not know the intrinsics of the algorithms so i cannot tell why
patricular eigenvecs have the same and some have different sign.
However, due to sign being non-identified "it does not matter". You must
have extra information to identify depending on your purposes.
The pca does not know what sign to assign. I think (correct me if i am
wrong)
pca uses princomp which uses eigensym and not eigengen.
For example,
<hansl>
matrix A = (1~0.8~-0.5)|(0.8~1~0.2)|(-0.5~0.2~1)
print A
matrix U0 = {}
eval eigengen(A,&U0)
print U0
matrix U1 = {}
eval eigensym(A,&U1)
print U1
</hansl>
or
<hansl>
matrix A = (1~0.8~0.25)|(0.8~1~0.4)|(0.25~0.4~1)
print A
matrix U0 = {}
eval eigengen(A,&U0)
print U0
matrix U1 = {}
eval eigensym(A,&U1)
print U1
</hansl>
Best,
Yiannis