Can someone ask you to confirm or correct this Wikipedia algorithm to calculate the first main component? I want a simple PCA implementation in D that does not have existing libraries for PCA AFAIK. I tried to implement this, and it doesnβt seem like my results on simple examples match what I get from R or Octave. I am sure that this is not an implementation error, because I checked my implementation several times and even rewrote it from scratch, and this is a fairly simple algorithm.
Is your data matrix a null value as preconditions require?
At this point, the code fragment is unclear, but as the data matrix is ββoriginally described, I think that in order to use the power method, the column must be zero.