The predict functions for the tree models return a list with one survfit object per row in new_data. So the resulting list of survfit summary objects gets aggregated by a new helper combine_list_of_survfit_summary(). Then the objects are the same as we'd expect them from the PH models and the rest of the helpers is used.
I left all the previous tests on predictions of survival probability untouched to show that they still pass fine.
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
Closes https://github.com/tidymodels/censored/issues/146
This PR is a follow-up to https://github.com/tidymodels/censored/pull/216 and #221 to now make use of those helper functions for survfit summary objects for tree-based models:
bag_tree()
with engine"rpart"
decision_tree()
with engine"partykit"
rand_forest()
with engine"partykit"
The predict functions for the tree models return a list with one survfit object per row in new_data. So the resulting list of survfit summary objects gets aggregated by a new helper
combine_list_of_survfit_summary()
. Then the objects are the same as we'd expect them from the PH models and the rest of the helpers is used.I left all the previous tests on predictions of survival probability untouched to show that they still pass fine.