censored 0.4.0
Breaking changes
bag_tree()with the"rpart"engine no longer accepts case weights. Fit the model without case weights instead (#390).bag_tree()with the"rpart"engine now passestree_depth,min_n, andcost_complexityon to the trees, so default fits now use thebag_tree()defaults ofcost_complexity = 0andmin_n = 2. To restore the previous fits, setcost_complexity = 0.01andmin_n = 20(#406).boost_tree()with the"mboost"engine no longer accepts case weights because mboost doesn’t predict from a weighted fit. Fit the model without case weights instead (#363).boost_tree()with the"mboost"engine no longer allows settingnuviaset_engine(). Uselearn_rateinstead (#395).boost_tree()with the"mboost"engine now warns and ignorescontrolandtree_controlswhen set viaset_engine(). Previously they silently overrode the main arguments, such astreesandtree_depth. Use the main arguments ofboost_tree()instead (#414).survival_prob_*()functions now error when given the defuncttimeargument. Useeval_timeinstead (#419).survival_prob_coxph()no longer has the defunctxargument. Useobjectinstead (#419).
New features
boost_tree()with the"mboost"engine now passeslearn_rateon tomboost::boost_control(nu), making it tunable. Previously it was silently ignored (#395).multi_predict()is now available forboost_tree()with the"mboost"engine over thetreessubmodel parameter (#290).null_model()gains a"survival"engine for censored regression, fitting a Kaplan-Meier curve viasurvival::survfit()(#353).rand_forest()gains a"randomForestSRC"engine for censored regression, fitting a survival random forest viarandomForestSRC::rfsrc()(#130).rand_forest()gains a"ranger"engine for censored regression, fitting a survival random forest viaranger::ranger()(#131).
Minor improvements and fixes
bag_tree()with the"rpart"engine now passestree_depth,min_n, andcost_complexity, as well as otherrpart::rpart.control()arguments set viaset_engine(), on to the trees. Previously they were silently ignored (#406).decision_tree()with the"rpart"engine now correctly returns the median survival time of the leaf’s Kaplan-Meier curve fortype = "time"predictions, instead of rpart’s relative event rate (#331).proportional_hazards()with the"glmnet"engine now predicts on data with factors when fitted throughfit_xy()(#365).proportional_hazards()with the"survival"engine now predicts when a singlestrata()term contains more than one variable, e.g.strata(s1, s2)(#404).survival_prob_*()andhazard_*()now validate their inputs and return more informative error messages when given an unusableobject,new_data, oreval_time(#271).survival_reg()with the"survival"engine andstrata()terms now returnsNAsurvival and hazard predictions for new data rows with a missing value in a stratification variable, instead of silently using another stratum’s scale (#383).Engine-specific tuning parameters are now registered by censored instead of parsnip (#417).
censored 0.3.3
CRAN release: 2025-02-14
Breaking change
- The format of quantile predictions now follows the new requirements in parsnip (#339, tidymodels/parsnip/#1209).
censored 0.3.2
CRAN release: 2024-06-11
- censored now depends on survival >= 3.7-0 which allows us to use it also for predictions of survival probabilities at infinite evaluation time points. This means that: Survival probabilities at
eval_time = Infare now not always set to 0 and confidence intervals at infinite evaluation times are now not always set toNA. This applies toproportional_hazards()andbag_tree()models as well as models with thepartykitengine,decision_tree()andrand_forest()(#320).
censored 0.3.0
CRAN release: 2024-01-31
New features
multi_predict()is now available for all prediction types forproportional_hazards()models with the"glmnet"engine, so newly also fortype = "time"andtype = "raw"(#277, #282).Random forests with the
"aorsf"engine can now predict survival time, i.e.,predict(type = "time")is now available (#308).
Breaking change
- The
survival_prob_*(),survival_time_*(), andhazard_*()helper functions now all take a parsnipmodel_fitobject as the main input, instead of an engine fit as was the case for some of them previously (#302).
Bug fixes
extract_fit_engine()now works properly for proportional hazards models fitted with the"glmnet"engine (#266).multi_predict(type = "survival")forproportional_hazards(engine = "glmnet")models: when used with a singlepenaltyvalue, this value is now included in the results. It was previously omitted (#267, #282).proportional_hazards(engine = "glmnet")models now don’t pretend to be able to deal with sparse matrices when they are not (#291).Fixed a bug for
proportional_hazards(engine = "glmnet")where prediction didn’t work for aworkflow()with a formula as the preprocessor (#264).
Other
- The helper functions
survival_time_coxnet()andsurvival_prob_coxnet()gain amultiargument to allow multiple values forpenalty(#278, #279).
censored 0.2.0
CRAN release: 2023-04-13
Cross-package changes with parsnip
The new
eval_timeargument replaces thetimeargument for the time points at which to predict survival probability and hazard. Thetimeargument has been deprecated (#244).The matrix interface for fitting,
fit_xy(), now works for censored regression models (#225, #234, #247, #251).Improved error messages throughout the package (#248).
New engines
Added the new
"aorsf"engine forrand_forest()for accelerated oblique random survival forests with the aorsf package (@bcjaeger, #211).Added the new
flexsurvsplineengine forsurvival_reg()(@mattwarkentin, #213).
Bug fixes
Predictions of type
"linear_pred"forsurvival_reg(engine = "flexsurv")are now on the correct scale for distributions where the natural scale and the unrestricted scale of the location parameter are identical, e.g.dist = "lnorm"(#229).Predictions of type
"linear_pred"forproportional_hazards(engine = "glmnet")viamulti_predict()now have the same sign as those viapredict()(#242).Predictions of survival probability for
survival_reg(engine = "flexsurv")for a single time point are now nested correctly (#254).Predictions of survival probability for
decision_tree(engine = "rpart")for a single observation now work (#256).Predictions of type
"quantile"forsurvival_reg(engine = "survival")for a single observation now work (#257).Fixed a bug for printing
coxnetmodels, i.e.,proportional_hazards()models fitted with the"glmnet"engine (#249).
Internal changes
Predictions of survival probabilities are now calculated via
summary.survfit()forproportional_hazards()models with the"survival"and"glmnet"engines,bag_tree()models with the"rpart"engine,decision_tree()models with the"partykit"engines, as well asrand_forest()models with the"partykit"engine (#221, #224).Added internal
survfit_summary_*()helper functions (#216).
censored 0.1.1
CRAN release: 2022-09-30
For boosted trees with the
"mboost"engine, survival probabilities can now be predicted fortime = -Inf. This is always 1. Fortime = Infthis now predicts a survival probability of 0 (#215).Updated tests on model arguments and
update()methods (#208).Internal re-organisation of code (#206, 209).
Added a
NEWS.mdfile to track changes to the package.
