projects
/
morpheus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Error when K > d for computeMu and optimParams
[morpheus.git]
/
pkg
/
R
/
computeMu.R
diff --git
a/pkg/R/computeMu.R
b/pkg/R/computeMu.R
index
bc52bb3
..
f961fde
100644
(file)
--- a/
pkg/R/computeMu.R
+++ b/
pkg/R/computeMu.R
@@
-46,6
+46,8
@@
computeMu = function(X, Y, optargs=list())
large_ratio <- ( abs(Σ[-d] / Σ[-1]) > 3 )
K <- if (any(large_ratio)) max(2, which.min(large_ratio)) else d
}
large_ratio <- ( abs(Σ[-d] / Σ[-1]) > 3 )
K <- if (any(large_ratio)) max(2, which.min(large_ratio)) else d
}
+ else if (K > d)
+ stop("K: integer >= 2, <= d")
# Step 1: generate a family of d matrices to joint-diagonalize to increase robustness
d = ncol(X)
# Step 1: generate a family of d matrices to joint-diagonalize to increase robustness
d = ncol(X)