Skip to content

Commit

Permalink
rmove dist checking so can plot multiple dist metrics using internal …
Browse files Browse the repository at this point in the history
…perf function
  • Loading branch information
evaham1 committed Nov 27, 2024
1 parent 2380e3f commit 9d3f7c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 0 additions & 4 deletions R/tune.mint.plsda.R
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@ tune.mint.plsda <-
if(sum(apply(table(Y,study)==0,2,sum)>0) >0)
warning("At least one study does not contain all the levels of the outcome Y. The MINT algorithm might not perform as expected.")


#-- dist
dist = match.arg(dist)

#-- light.output
if (!is.logical(light.output))
stop("'light.output' must be either TRUE or FALSE", call. = FALSE)
Expand Down
11 changes: 7 additions & 4 deletions R/tune.mint.splsda.R
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,6 @@ tune.mint.splsda <-
if(sum(apply(table(Y,study)==0,2,sum)>0) >0)
warning("At least one study does not contain all the levels of the outcome Y. The MINT algorithm might not perform as expected.")


#-- dist
dist = match.arg(dist)

#-- light.output
if (!is.logical(light.output))
stop("'light.output' must be either TRUE or FALSE", call. = FALSE)
Expand All @@ -239,6 +235,13 @@ tune.mint.splsda <-
} else {
if (is.null(test.keepX) | length(test.keepX) == 1 | !is.numeric(test.keepX))
stop("'test.keepX' must be a numeric vector with more than two entries", call. = FALSE)

#-- dist (for tune can only have one dist, for perf can have multiple)
dist = match.arg(
dist,
choices = c("max.dist", "centroids.dist", "mahalanobis.dist"),
several.ok = TRUE
)

#-- end checking --#
#------------------#
Expand Down

0 comments on commit 9d3f7c9

Please sign in to comment.