What’s new in 0.21#
scikit-survival 0.21.0 (2023-06-11)#
This is a major release bringing new features and performance improvements.
sksurv.nonparametric.kaplan_meier_estimator()can estimate pointwise confidence intervals by specifying the conf_type parameter.sksurv.ensemble.GradientBoostingSurvivalAnalysissupports early-stopping via the monitor parameter ofsksurv.ensemble.GradientBoostingSurvivalAnalysis.fit().sksurv.metrics.concordance_index_censored()has a significantly reduced memory footprint. Memory usage now scales linear, instead of quadratic, in the number of samples.Fitting of
sksurv.tree.SurvivalTree,sksurv.ensemble.RandomSurvivalForest, orsksurv.ensemble.ExtraSurvivalTreesis about 3x faster.Finally, the release adds support for Python 3.11 and pandas 2.0.
Bug fixes#
Fix bug where times passed to
sksurv.metrics.brier_score()was downcast, resulting in a loss of precision that may lead to duplicate time points (#349).Fix inconsistent behavior of evaluating functions returned by predict_cumulative_hazard_function or predict_survival_function (#375).
Enhancements#
sksurv.nonparametric.kaplan_meier_estimator()andsksurv.nonparametric.CensoringDistributionEstimatorsupport returning confidence intervals by specifying the conf_type parameter (#348).Configure package via pyproject.toml (#347).
Add support for Python 3.11 (#350).
Add support for early-stopping to
sksurv.ensemble.GradientBoostingSurvivalAnalysis(#354).Do not use deprecated pkg_resources API (#353).
Significantly reduce memory usage of
sksurv.metrics.concordance_index_censored()(#362).Set criterion attribute in
sksurv.tree.SurvivalTreesuch thatsklearn.tree.plot_tree()can be used (#366).Significantly improve speed to fit a
sksurv.tree.SurvivalTree,sksurv.ensemble.RandomSurvivalForest, orsksurv.ensemble.ExtraSurvivalTrees(#371).Expose
_predict_risk_scoreattribute insklearn.pipeline.Pipelineif the final estimator of the pipeline has such property (#374).Add support for pandas 2.0 (#373).
Documentation#
Fix wrong number of selected features in the guide Introduction to Survival Analysis (#345).
Fix broken links with nbsphinx 0.9.2 (#367).
Backwards incompatible changes#
The attribute
event_times_of estimators has been replaced byunique_times_to clarify that these are all the unique times points, not just the once where an event occurred (#371).Functions returned by predict_cumulative_hazard_function and predict_survival_function of
sksurv.tree.SurvivalTree,sksurv.ensemble.RandomSurvivalForest, andsksurv.ensemble.ExtraSurvivalTreesare over all unique time points passed as training data, instead of all unique time points where events occurred (#371).Evaluating a function returned by predict_cumulative_hazard_function or predict_survival_function will no longer raise an exception if the specified time point is smaller than the smallest time point observed during training. Instead, the value at
StepFunction.x[0]will be returned (#375).