lisitsyn / tapkee

A flexible and efficient С++ template library for dimension reduction
http://tapkee.lisitsyn.me
BSD 3-Clause "New" or "Revised" License
232 stars 57 forks source link

Issue in PCA's projection function #45

Closed Aneoshun closed 6 years ago

Aneoshun commented 6 years ago

Hi all,

Thanks for this library, I think it can be useful for my own research.

I am trying to use the projection function of the PCA. However, the result of the project is always a vector with the length of the high-dimensional space. Also, a dimension analysis of the matrix/vectors of the projection function, shows that there is something weird. Is this a bug or am I missing something?

I suspect that there is a .transpose() missing in the definition of the projection function Here

I tested this on my side, and I managed to retrieve the embedding after projecting the training dataset with my modified projection function.

Thanks

lisitsyn commented 6 years ago

Hey @Aneoshun,

thanks for reporting. Let me check and get back to you.

lisitsyn commented 6 years ago

I tried adding transpose in PR #46 and it fixed the problem indeed. Although the tests are failing on Travis, it might be due to Eigen versions.