# NOT RUN {
library(mlbench)
set.seed(1111)
# Random Forest analysis of model based recursive partitioning load data
data("BostonHousing", package = "mlbench")
BostonHousing <- BostonHousing[1:90, c("rad", "tax", "crim", "medv", "lstat")]
# Recursive partitioning based on linear regression model medv ~ lstat with 3
# trees. 1 core/processor used.
rfout <- mobforest.analysis(as.formula(medv ~ lstat), c("rad", "tax", "crim"),
mobforest_controls = mobforest.control(ntree = 3, mtry = 2, replace = T,
alpha = 0.05, bonferroni = T, minsplit = 25), data = BostonHousing,
processors = 1, model = linearModel, seed = 1111)
# get predictive performance estimates and produce a performance plot
pacc <- predictive.acc(rfout)
# }
# NOT RUN {
# }
Run the code above in your browser using DataCamp Workspace