powered by
Create setting for random forest model with python (very fast)
setRandomForest(mtries = -1, ntrees = 500, maxDepth = c(4, 10, 17), varImp = T, seed = NULL)
The number of features to include in each tree (-1 defaults to square root of total features)
The number of trees to build
Maximum number of interactions - a large value will lead to slow model training
Perform an initial variable selection prior to fitting the model to select the useful variables
An option to add a seed when training the final model
# NOT RUN { model.rf <- setRandomForest(mtries=c(-1,5,20), ntrees=c(10,100), maxDepth=c(5,20)) # }
Run the code above in your browser using DataLab