Skip to content

Commit

Permalink
typos in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evaham1 committed Oct 24, 2024
1 parent 4623043 commit 687095f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-perf.mixo.splsda.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ test_that("perf.mixo_splsda", code = {

set.seed(12)
srbct.splsda <- splsda(X, Y, ncomp = 2, keepX = rep(10, 2))
class(res) # "mixo_splsda" "mixo_spls" "DA"
class(srbct.splsda) # "mixo_splsda" "mixo_spls" "DA"
set.seed(45)
out <- suppressWarnings(
perf(srbct.splsda, validation = "Mfold", folds = 8,
Expand All @@ -98,7 +98,7 @@ test_that("perf.mixo_splsda in serial and parallel", code = {

set.seed(12)
srbct.splsda <- splsda(X, Y, ncomp = 2, keepX = rep(10, 2))
class(res) # "mixo_splsda" "mixo_spls" "DA"
class(srbct.splsda) # "mixo_splsda" "mixo_spls" "DA"

# in serial
set.seed(12)
Expand All @@ -124,7 +124,7 @@ test_that("perf.mixo_splsda in serial and parallel with progress bars", code = {

set.seed(12)
srbct.splsda <- splsda(X, Y, ncomp = 2, keepX = rep(10, 2))
class(res) # "mixo_splsda" "mixo_spls" "DA"
class(srbct.splsda) # "mixo_splsda" "mixo_spls" "DA"

# in serial
set.seed(12)
Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/test-perf.pls.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ test_that("perf() works on pls with nzv features (all modes)", code = {
data("liver.toxicity")
X <- liver.toxicity$gene[1:1000]
Y <- liver.toxicity$clinic
class(pls.obg) # "mixo_pls"

# to reproduce error, we need to induce some features to have near zero variance
X[, c(1, 23, 62, 234, 789)] <- 0
Expand Down Expand Up @@ -123,7 +122,7 @@ test_that("perf() works on spls object in serial and parallel", code = {
Y <- liver.toxicity$clinic
model.spls = spls(X, Y, ncomp = 7, mode = 'regression',
keepX = c(rep(10, 7)), keepY = c(rep(4, 7)))
class(pls.obg) # "mixo_pls"
class(model.spls) # "mixo_pls"

set.seed(12)
model.spls.val <- perf(model.spls, validation = "Mfold", folds = 10,
Expand Down

0 comments on commit 687095f

Please sign in to comment.