Our team run the following code to create a random forest model and train it:
# Define a cross validation strategy
rdesc <- makeResampleDesc("CV", iters = cv_fold, predict = "both")
# Define a (regression) task
task_01 = makeRegrTask(data = data.model, target = "target_actual")
# Make a learner
lrn_rf = makeLearner("regr.randomForestSRC", predict.type = "response",
fix.factors.prediction = TRUE,
par.vals = list(nodesize = 50, mtry = 36, ntree = 500))
set.seed(7)
model_rf = mlr::resample(lrn_rf, task_01, rdesc, models = TRUE,
extract = function(x) getLearnerModel(x),
measures = list(rmse, rsq), show.info = FALSE)
model_rf
Mostly, the model predicts coherent results that make sense. However, when I run exactly the same code (no changes whatsoever) on the computers of two of my colleagues, the model predicts those weird results:
Resample Result
Task: data.model
Learner: regr.randomForestSRC
Aggr perf: rmse.test.rmse=361.1464455,rsq.test.mean=-588.1729057
Runtime: 4.0032
What could be the reason for this weird behavior on only two computers but not the other ones?