Skip to content

Commit

Permalink
uses rpart instead of randomForest for faster example
Browse files Browse the repository at this point in the history
  • Loading branch information
christophM committed Sep 24, 2020
1 parent 9e01dd0 commit d3ff468
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/FeatureEffect.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
#' @examples
#' # We train a random forest on the Boston dataset:
#' data("Boston", package = "MASS")
#' library("randomForest")
#' rf <- randomForest(medv ~ ., data = Boston, ntree = 50)
#' library("rpart")
#' rf <- rpart(medv ~ ., data = Boston)
#' mod <- Predictor$new(rf, data = Boston)
#'
#' # Compute the accumulated local effects for the first feature
Expand Down Expand Up @@ -109,7 +109,7 @@
#' plot(eff)
#'
#' # FeatureEffect plots also works with multiclass classification
#' rf <- randomForest(Species ~ ., data = iris, ntree = 50)
#' rf <- rpart(Species ~ ., data = iris)
#' mod <- Predictor$new(rf, data = iris, type = "prob")
#'
#' # For some models we have to specify additional arguments for the predict
Expand Down

0 comments on commit d3ff468

Please sign in to comment.