View source: R/predict.multifor.R
predict.multifor | R Documentation |
multifor
Prediction with new data and a saved forest from multifor
.
## S3 method for class 'multifor'
predict(
object,
data = NULL,
predict.all = FALSE,
num.trees = object$num.trees,
type = "response",
seed = NULL,
num.threads = NULL,
verbose = TRUE,
...
)
object |
|
data |
New test data of class |
predict.all |
Return individual predictions for each tree instead of aggregated predictions for all trees. Return a matrix (sample x tree) for classification, a 3d array for probability estimation (sample x class x tree). |
num.trees |
Number of trees used for prediction. The first |
type |
Type of prediction. If "response" (default), the predicted classes (classification) or predicted probabilities (probability estimation) are returned. If "terminalNodes", the IDs of the terminal node in each tree for each observation in the given dataset are returned. |
seed |
Random seed. Default is |
num.threads |
Number of threads. Default is number of CPUs available. |
verbose |
Verbose output on or off. |
... |
further arguments passed to or from other methods. |
This package is a fork of the R package 'ranger' that implements random forests using an efficient C++ implementation. More precisely, 'diversityForest' was written by modifying the code of 'ranger', version 0.11.0.
Object of class multifor.prediction
with elements
predictions | Predicted classes/values (only for classification and regression) |
num.trees | Number of trees. |
num.independent.variables | Number of independent variables. |
num.samples | Number of samples. |
treetype | Type of forest/tree. Classification or probability. |
Marvin N. Wright
Hornung, R. (2022). Diversity forests: Using split sampling to enable innovative complex split procedures in random forests. SN Computer Science 3(2):1, <\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s42979-021-00920-1")}>.
Wright, M. N., Ziegler, A. (2017). ranger: A fast Implementation of Random Forests for High Dimensional Data in C++ and R. Journal of Statistical Software 77:1-17, <\Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v077.i01")}>.
Wager, S., Hastie T., & Efron, B. (2014). Confidence Intervals for Random Forests: The Jackknife and the Infinitesimal Jackknife. Journal of Machine Learning Research 15:1625-1651.
Meinshausen (2006). Quantile Regression Forests. Journal of Machine Learning Research 7:983-999.
multifor
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.