X-Git-Url: https://git.auder.net/?p=morpheus.git;a=blobdiff_plain;f=pkg%2FR%2FcomputeMu.R;h=ea931d27ea58a2963cd148d9cb07c11415b42dac;hp=f7f82ad20a3565522f3e6f69fb1d3da90f7de911;hb=0f5fbd1371011f25cd1f6caf0e826d2ea9e4e245;hpb=9a6881ed8a16c31a3dbe995e3b1af76c1db6b5a0 diff --git a/pkg/R/computeMu.R b/pkg/R/computeMu.R index f7f82ad..ea931d2 100644 --- a/pkg/R/computeMu.R +++ b/pkg/R/computeMu.R @@ -66,9 +66,8 @@ computeMu = function(X, Y, optargs=list()) jd_method = ifelse(!is.null(optargs$jd_method), optargs$jd_method, "uwedge") V = if (jd_nvects > 1) { - #NOTE: increasing itermax does not help to converge, thus we suppress warnings + # NOTE: increasing itermax does not help to converge, thus we suppress warnings suppressWarnings({jd = jointDiag::ajd(M2_t, method=jd_method)}) -# if (jd_method=="uwedge") jd$B else solve(jd$A) if (jd_method=="uwedge") jd$B else MASS::ginv(jd$A) } else @@ -79,7 +78,6 @@ computeMu = function(X, Y, optargs=list()) for (i in seq_len(K)) M2_t[,,i] = .T_I_I_w(M[[3]],V[,i]) suppressWarnings({jd = jointDiag::ajd(M2_t, method=jd_method)}) -# U = if (jd_method=="uwedge") solve(jd$B) else jd$A U = if (jd_method=="uwedge") MASS::ginv(jd$B) else jd$A μ = normalize(U[,1:K])