v0.21.0
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.GradientBoostingSurvivalAnalysis supports early-stopping via the monitor parameter of sksurv.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, or sksurv.ensemble.ExtraSurvivalTrees is 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
orpredict_survival_function
(#375).
Enhancements
- sksurv.nonparametric.kaplan_meier_estimator() and sksurv.nonparametric.CensoringDistributionEstimator support 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.SurvivalTree such that sklearn.tree.plot_tree() can be used (#366).
- Significantly improve speed to fit a sksurv.tree.SurvivalTree, sksurv.ensemble.RandomSurvivalForest, or sksurv.ensemble.ExtraSurvivalTrees (#371).
- Expose
_predict_risk_score
attribute in sklearn.pipeline.Pipeline if 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
andpredict_survival_function
of sksurv.tree.SurvivalTree, sksurv.ensemble.RandomSurvivalForest, and sksurv.ensemble.ExtraSurvivalTrees are 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
orpredict_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 atStepFunction.x[0]
will be returned (#375).
New Contributors
- @dor132 made their first contribution in #345
- @cpoerschke made their first contribution in #358
Full Changelog: v0.20.0...v0.21.0