"predict"(object, data, predict.all = FALSE, num.trees = object$num.trees, type = "response", seed = NULL, num.threads = NULL, verbose = TRUE, ...)ranger.forest object.data.frame or gwaa.data (GenABEL).num.trees in the forest are used.ranger.prediction with elements
predictions |
| Predicted classes/values (only for classification and regression) |
unique.death.times |
| Unique death times (only for survival). |
chf |
| Estimated cumulative hazard function for each sample (only for survival). |
survival |
| Estimated survival function for each sample (only for survival). |
num.trees |
| Number of trees. |
num.independent.variables |
| Number of independent variables. |
treetype |
| Type of forest/tree. Classification, regression or survival. |
type = 'response' (the default), the predicted classes (classification), predicted numeric values (regression), predicted probabilities (probability estimation) or survival probabilities (survival) are returned.
For type = 'terminalNodes', the IDs of the terminal node in each tree for each observation in the given dataset are returned.For classification and predict.all = TRUE, a matrix of factor levels is returned.
To retrieve the corresponding factor levels, use rf$forest$levels, if rf is the ranger object.
ranger