orsf_summarize_uni {aorsf} | R Documentation |
Univariate summary
Description
Summarize the univariate information from an ORSF object
Usage
orsf_summarize_uni(
object,
n_variables = NULL,
pred_horizon = NULL,
pred_type = NULL,
importance = NULL,
class = NULL,
verbose_progress = FALSE,
...
)
Arguments
object |
(ObliqueForest) a trained oblique random forest object (see orsf). |
n_variables |
(integer) how many variables should be summarized? Setting this input to a lower number will reduce computation time. |
pred_horizon |
(double) Only relevent for survival forests.
A value or vector indicating the time(s) that predictions will be
calibrated to. E.g., if you were predicting risk of incident heart
failure within the next 10 years, then |
pred_type |
(character) the type of predictions to compute. Valid Valid options for survival are:
For classification:
For regression:
|
importance |
(character) Indicate method for variable importance:
|
class |
(character) only relevant for classification forests.
If For details on these methods, see orsf_vi. |
verbose_progress |
(logical) if |
... |
Further arguments passed to or from other methods (not currently used). |
Details
If pred_horizon
is left unspecified, the median value of
the time-to-event variable in object
's training data will be used.
It is recommended to always specify your own prediction horizon,
as the median time may not be an especially meaningful horizon to
compute predicted risk values at.
If object
already has variable importance values, you can
safely bypass the computation of variable importance in this function
by setting importance = 'none'.
Value
an object of class 'orsf_summary', which includes data on
importance of individual predictors.
expected values of predictions at specific values of predictors.
See Also
as.data.table.orsf_summary_uni
Examples
object <- orsf(pbc_orsf, Surv(time, status) ~ . - id, n_tree = 25)
# since anova importance was used to make object, it is also
# used for ranking variables in the summary, unless we specify
# a different type of importance
orsf_summarize_uni(object, n_variables = 2)
# if we want to summarize object according to variables
# ranked by negation importance, we can compute negation
# importance within orsf_summarize_uni() as follows:
orsf_summarize_uni(object, n_variables = 2, importance = 'negate')
# for multi-category fits, you can specify which class
# you want to summarize:
object = orsf(species ~ ., data = penguins_orsf, n_tree = 25)
orsf_summarize_uni(object, class = "Adelie", n_variables = 1)