View source: R/pipe_randomForest.R
pipe_randomForest | R Documentation |
Random forest model with randomForest
pipe_randomForest(
df,
predInput = NULL,
responseVar = 1,
caseClass = NULL,
idVars = character(),
weight = "class",
crossValStrategy = c("Kfold", "bootstrap"),
k = 5,
replicates = 10,
crossValRatio = c(train = 0.6, test = 0.2, validate = 0.2),
ntree = 500,
importance = TRUE,
shap = TRUE,
aggregate_shap = TRUE,
repVi = 5,
summarizePred = TRUE,
scaleDataset = FALSE,
RFmodel = FALSE,
DALEXexplainer = FALSE,
variableResponse = FALSE,
save_validateset = FALSE,
filenameRasterPred = NULL,
tempdirRaster = NULL,
nCoresRaster = parallel::detectCores()%/%2,
verbose = 0,
...
)
df |
a |
predInput |
a |
responseVar |
response variable as column name or index on |
caseClass |
class of the samples used to weight cases. Column names or indexes on |
idVars |
id column names or indexes on |
weight |
Optional array of the same length as |
crossValStrategy |
|
k |
number of data partitions when |
replicates |
number of replicates for |
crossValRatio |
Proportion of the dataset used to train, test and validate the model when |
ntree |
Number of trees to grow. |
importance |
parameter for |
shap |
if |
aggregate_shap |
if |
repVi |
replicates of the permutations to calculate the importance of the variables. 0 to avoid calculating variable importance. |
summarizePred |
if |
scaleDataset |
if |
RFmodel |
if TRUE, return the model with the result. |
DALEXexplainer |
if |
variableResponse |
if |
save_validateset |
save the validateset (independent data not used for training). |
filenameRasterPred |
if no missing, save the predictions in a RasterBrick to this file. |
tempdirRaster |
path to a directory to save temporal raster files. |
nCoresRaster |
number of cores used for parallelized raster cores. Use half of the available cores by default. |
verbose |
If > 0, print state and passed to randomForest functions |
... |
extra parameters for |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.