randomForestPredict {CornerstoneR}R Documentation

Random Forest Prediction

Description

Random Forest prediction via predict.ranger. Predicts response variables from predictor variables, using ranger objects. All ranger objects have to work on the same set of prediction variables. These variables are exactly available in the prediction dataset. A response is not necessary, it will be predicted via this function.

Usage

randomForestPredict(
  dataset = cs.in.dataset(),
  preds = cs.in.predictors(),
  robject = cs.in.Robject(),
  return.results = FALSE,
  ...
)

Arguments

dataset

[data.frame]
Dataset with named columns. The names correspond to predictors and responses.

preds

[character]
Character vector of predictor variables.

robject

[list]
Named list of ranger object(s) set via Cornerstone menu "Input R Objects".

return.results

[logical(1)]
If FALSE the function returns TRUE invisibly. If TRUE, it returns a list of results. Default is FALSE.

...

[ANY]
Additional arguments to be passed to ranger . Please consider possible script variables (scriptvars) to prevent duplicates.

Value

Logical [TRUE] invisibly and outputs to Cornerstone or, if return.results = TRUE, list of resulting data.frame objects:

predictions

Dataset to brush with predicted values for dataset. The original input and other columns can be added to this dataset through the menu Columns -> Add from Parent ....

See Also

randomForest


[Package CornerstoneR version 2.0.2 Index]