Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jakob-r committed Oct 26, 2020
1 parent f19ae65 commit aa00188
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion man/getFeatureImportance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test_base_resample.R
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ test_that("resample drops unseen factors in predict data set", {

lrn = makeLearner("classif.logreg", fix.factors.prediction = TRUE)
model = train(lrn, subsetTask(task, 1:4))
predict(model, subsetTask(task, 5:6))
resample(lrn, task, resinst)
expect_warning(predict(model, subsetTask(task, 5:6)), "produced NAs because of new factor levels")
expect_warning(resample(lrn, task, resinst), "produced NAs because of new factor levels")

# do it manually
train_task = makeClassifTask("unseen.factors", data[1:4,], "trg", fixup = "quiet") # quiet becasue
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test_classif_ksvm.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test_that("classif_ksvm", {
parset = list(kernel = "polydot", degree = 3, offset = 2, scale = 1.5))
})

test_that("classif_ksvm produces error for new factor levels on predict" {
test_that("classif_ksvm produces error for new factor levels on predict", {
# https://github.com/mlr-org/mlr/issues/2771
train_data = data.frame(
A = sample(c("A","B"), 10, TRUE),
Expand Down

0 comments on commit aa00188

Please sign in to comment.