I'm trying to run a two-way partial dependence plot as efficiently as possible (with parallelized computation), and am using the following specification
cluster <- makeCluster(detectCores() - 1) # convention to leave 1 core for OS
registerDoParallel(cluster)
partial(cforest_adjusted,
pred.var = c("avg_mtg_duration", "avg_mtg_attd"),
trim.outliers = TRUE, chull = TRUE, parallel = TRUE,
grid.resolution = 30)
The cforest_adjusted object is from the ranger library using the "maxstat" split.
I get the following error:
: ... may be used in an incorrect context: â.fun(piece, ...)â : ... may be used in an incorrect context: â.fun(piece, ...)â Error in do.ply(i) : task 1 failed - "no applicable method for 'predict' applied to an object of class "ranger""
I'm guessing I have to supply a custom predict function to the do.ply backend, but am now sure how to do this.