Closed cnuernber closed 2 years ago
Hi Chris,
In this particular ev invocation, the problem is that the ev method is not supported for triangular matrices. However, this is not the real problem in this code, since you intend to call ev on the covariance matrix, which should be symmetrical instead of triangular. I know, technically they may look similar, but there is a big difference in semantics: the ld matrix in your code (being triangular) implies zero values where asterisks are displayed, which obviously is not what you intended to do.
In short, the ld matrix should either be a symmetrical matrix (SY), or a GE matrix in which you make sure that upper and lower triangles are the same.
Also, it may be interesting (and useful) to you that there is a whole dedicated chapter on implementing and optimizing PCA in my book Numerical Linear Algebra for Programmers (pages 195-211) https://aiprobook.com/numerical-linear-algebra-for-programmers/
view-sy
worked like a charm, thanks. Closing issue.
I am working on a java API for tmd which includes exposing neanderthal. Neanderthal itself I think could have a fairly straight forward java API and that may allow you access to more users as it is a much better library in nearly all respects than dl4j.
as it is a much better library in nearly all respects than dl4j.
Thank you!
I am computing PCA via the covariance method which boils down to a triangular matrix:
The actual transformation is here. I would like to use view-tr and then ev on that as opposed to ev on the entire covariance matrix.