Skip to content

Commit

Permalink
for test_oneclass_h2oautoencoder the fct testProb() is needed. The le…
Browse files Browse the repository at this point in the history
…ngth(target) in both cases of classif and oneclass is 1. Therefore I needed to add an addtional if-block to differentiate between oneclass and classif.
  • Loading branch information
Minh Le committed May 9, 2017
1 parent 283e8e6 commit 8da8556
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/testthat/helper_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ testProb = function(t.name, df, target, train.inds, old.probs, parset = list())
test = df[-inds, ]

if (length(target) == 1) {
task = makeClassifTask(data = df, target = target)
if (grepl("oneclass", t.name)) {
task = makeOneClassTask(data = df)
} else {
task = makeClassifTask(data = df, target = target)
}
} else {
task = makeMultilabelTask(data = df, target = target)
}
Expand Down

0 comments on commit 8da8556

Please sign in to comment.