orsf_update {aorsf} | R Documentation |
Update Forest Parameters
Description
Update Forest Parameters
Usage
orsf_update(object, ..., modify_in_place = FALSE, no_fit = NULL)
Arguments
object |
(ObliqueForest) an oblique random forest object (see orsf). |
... |
arguments to plug into orsf that will be used to define the update. These arguments include:
Note that you can update |
modify_in_place |
(logical) if |
no_fit |
(logical) if |
Details
There are several dynamic inputs in orsf
with default values of NULL
.
Specifically, these inputs are control
, weights
, mtry
, split_rule
,
split_min_stat
, pred_type
, pred_horizon
, oobag_eval_function
,
tree_seeds
, and oobag_eval_every
. If no explicit value is given for
these inputs in the call, they will be re-formed. For example, if
an initial forest includes 17 predictors, the default mtry
is the
smallest integer that is greater than or equal to the square root of 17,
i.e., 5. Then, if you make an updated forest with 1 less predictor and
you do not explicitly say mtry = 5
, then mtry
will be re-initialized
in the update based on the available 16 predictors, and the resulting
value of mtry
will be 4. This is done to avoid many potential errors
that would occur if the dynamic outputs were not re-initialized.
Value
an ObliqueForest
object.
Examples
## Not run:
# initial fit has mtry of 5
fit <- orsf(pbc_orsf, time + status ~ . -id)
# note that mtry is now 4 (see details)
fit_new <- orsf_update(fit, formula = . ~ . - edema, n_tree = 100)
# prevent dynamic updates by specifying inputs you want to freeze.
fit_newer <- orsf_update(fit_new, mtry = 2)
## End(Not run)