Skip to content

Commit

Permalink
PERF: rvcoef subtlety
Browse files Browse the repository at this point in the history
  • Loading branch information
stnava committed Nov 3, 2024
1 parent c60cbc8 commit 57531cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/multiscaleSVDxpts.R
Original file line number Diff line number Diff line change
Expand Up @@ -4415,7 +4415,8 @@ rvcoef <- function(X, Y) {
C <- t(X_norm) %*% Y_norm

# Compute SVD
svd_C <- ba_svd(C, dividebymax=TRUE )
# svd_C <- corpcor::fast.svd( C )
svd_C <- svd( C + diag(1e-8 , nrow(C)) )

# Compute RV coefficient
sigma_sq <- sum(svd_C$d^2)
Expand Down

0 comments on commit 57531cc

Please sign in to comment.