Random Planted Forest Predictions
Arguments
- object
[rpf]: A fittedrpfmodel.- new_data
[data.frame | matrix]: New observations to predict.- type
[character(1)]:"numeric"for regression outcomes,"class"for class predictions or"prob"for probability predictions. Defaults to"numeric"for regression and"prob"for classification.For classification and
loss = "L1"or"L2","numeric"yields raw predictions which are not guaranteed to be valid probabilities in[0, 1]. Fortype = "prob", these are truncated to ensure this property.If
lossis"logit"or"exponential",type = "link"is an alias fortype = "numeric", as in this case the raw predictions have the additional interpretation similar to the linear predictor in aglm.- nthreads
[integer(1) | NULL: NULL]: Number of threads.NULLuses thenthreadsthe forest was fitted with, capped at the available cores.- ...
Not currently used, but required for extensibility. Unknown arguments are an error.
Value
For regression: A tbl with column .pred with
the same number of rows as new_data.
For classification: A tbl with one column .pred_<level>
for each level in y containing class probabilities if type = "prob".
For type = "class", one column .pred_class with class predictions is returned.
For type = "numeric" or "link", raw predictions are returned: one column
.pred for binary outcomes, and one column .pred_<level> per level for
multiclass outcomes. With loss = "logit", the first level is the reference
class and has no column, so K - 1 columns are returned for K levels.