survival_prob_partykit | R Documentation |
A wrapper for survival probabilities with partykit models
survival_prob_partykit(
object,
new_data,
eval_time,
time = deprecated(),
output = "surv"
)
object |
A parsnip |
new_data |
A data frame to be predicted. |
eval_time |
A vector of times to predict the survival probability. |
time |
Deprecated in favor of |
output |
Type of output. Can be either |
A tibble with a list column of nested tibbles.
tree <- decision_tree() %>%
set_mode("censored regression") %>%
set_engine("partykit") %>%
fit(Surv(time, status) ~ age + ph.ecog, data = lung)
survival_prob_partykit(tree, lung[1:3, ], eval_time = 100)
forest <- rand_forest() %>%
set_mode("censored regression") %>%
set_engine("partykit") %>%
fit(Surv(time, status) ~ age + ph.ecog, data = lung[1:100, ])
survival_prob_partykit(forest, lung[1:3, ], eval_time = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.