Skip to content

Commit

Permalink
hopefully found the error (name of targets was not taken)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippPro committed Aug 11, 2016
1 parent f460a68 commit 365d047
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions R/MultilabelDBRWrapper.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ predictLearner.MultilabelDBRWrapper = function(.learner, .model, .newdata, ...)
function(m) getPredictionProbabilities(predict(m, newdata = .newdata, ...), cl = "TRUE")
}
pred.lvl1 = sapply(data.frame(asMatrixCols(lapply(models.lvl1, f))), as.numeric)
colnames(pred.lvl1) = .model$task.desc$target
# Meta level prediction
models.meta = models[(length(.model$task.desc$target) + 1):(2 * length(.model$task.desc$target))]
newdata.meta = data.frame(.newdata, pred.lvl1)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test_learners_all_multilabel.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test_that("learners work: multilabel", {
# settings to make learners faster and deal with small sample size
hyperpars = list()

# multiabel
# multilabel
lrns = mylist("multilabel", create = TRUE)
lapply(lrns, testThatLearnerCanTrainPredict, task = multilabel.task, hyperpars = hyperpars)

Expand Down

0 comments on commit 365d047

Please sign in to comment.