Skip to content

Commit

Permalink
add centering
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbin973 committed Dec 27, 2024
1 parent 34b8ce0 commit 38882a3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions randPedPCA/R/rppca.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ randSVD <- function(L, rank, depth, numVectors){
# numVectors: usually rank + 5~10, must be larger than rank
dim <- nrow(L)
Q <- randRangeFinder(L, rank, depth, numVectors)
# Q <- apply(Q, 2, function(col) col - mean(col))
C <- t(backsolve(t(L), Q))
svdObject <- svd(C)
U <- Q %*% svdObject$u
Expand Down

0 comments on commit 38882a3

Please sign in to comment.