Wrap ranger::ranger()
into a patroklos-compliant fitter
ptk_ranger.Rd
This function is a patroklos-compliant fitter with validated
predictions, it has a return value with a val_predict
attribute.
Arguments
- x
Named numeric matrix. Predictor matrix without
NA
s. Samples correspond to rows. Discrete features are encoded as binary dummy variables.- y
Named list with the response in thee formats:
"bin"
, a named numeric one-column matrix, binary response,"cox"
, a named numeric two-column matrix, with columns"time_to_event"
and"event"
(0 = censoring, 1 = event), the response in the Cox format,"true"
, a named numeric one-column matrix, true binary response.
The rownames of
y[["bin"]]
andy[["true"]]
are a subset of the rownames ofx
and, in general, do not coincide. Useintersect_by_names()
to get equal rownames.- rel_mtry
logical. If
TRUE
, interpretmtry
as relative tosqrt(ncol(x))
(the recommended value), rounded to the next integer. Otherwise, takemtry
directly.- mtry
integer. Number of features to consider at each split when growing a tree of the random forest.
- skip_on_invalid_input
Logical. If
TRUE
and invalid input is detected, returnNA
instead of an error. This is useful when calling this function from insidelong_nestor()
.- ...
Further arguments passed to the wrapped function.