Skip to content

Commit

Permalink
Black boost multinomial restrictions for issue #779
Browse files Browse the repository at this point in the history
  • Loading branch information
topepo committed Nov 27, 2017
1 parent 3f60e63 commit 1c1eff0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/files/blackboost.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ modelInfo <- list(label = "Boosted Tree",
fit = function(x, y, wts, param, lev, last, classProbs, ...) {
theDots <- list(...)

if(length(levels(y)) > 2)
stop("Two-class outcomes only. See ?mboost::Multinomial",
call. = FALSE)

if(any(names(theDots) == "tree_controls")) {
theDots$tree_controls$maxdepth <- param$maxdepth
treeCtl <- theDots$tree_controls
Expand Down
Binary file modified pkg/caret/inst/models/models.RData
Binary file not shown.

0 comments on commit 1c1eff0

Please sign in to comment.