This is a major release bringing new features and performance improvements.
- [sksurv.nonparametric.kaplan_meier_estimator()](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.nonparametric.kaplan_meier_estimator.html#sksurv.nonparametric.kaplan_meier_estimator) can estimate pointwise confidence intervals by specifying the `conf_type` parameter.
- [sksurv.ensemble.GradientBoostingSurvivalAnalysis](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.ensemble.GradientBoostingSurvivalAnalysis.html#sksurv.ensemble.GradientBoostingSurvivalAnalysis) supports early-stopping via the monitor parameter of [sksurv.ensemble.GradientBoostingSurvivalAnalysis.fit()](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.ensemble.GradientBoostingSurvivalAnalysis.html#sksurv.ensemble.GradientBoostingSurvivalAnalysis.fit).
- [sksurv.metrics.concordance_index_censored()](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.metrics.concordance_index_censored.html#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](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.tree.SurvivalTree.html#sksurv.tree.SurvivalTree), [sksurv.ensemble.RandomSurvivalForest](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.ensemble.RandomSurvivalForest.html#sksurv.ensemble.RandomSurvivalForest), or [sksurv.ensemble.ExtraSurvivalTrees](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.ensemble.ExtraSurvivalTrees.html#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()](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.metrics.brier_score.html#sksurv.metrics.brier_score) was downcast, resulting in a loss of precision that may lead to duplicate time points ([349](https://github.com/sebp/scikit-survival/issues/349)).
- Fix inconsistent behavior of evaluating functions returned by `predict_cumulative_hazard_function` or `predict_survival_function` ([375](https://github.com/sebp/scikit-survival/issues/375)).
Enhancements
- [sksurv.nonparametric.kaplan_meier_estimator()](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.nonparametric.kaplan_meier_estimator.html#sksurv.nonparametric.kaplan_meier_estimator) and [sksurv.nonparametric.CensoringDistributionEstimator](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.nonparametric.CensoringDistributionEstimator.html#sksurv.nonparametric.CensoringDistributionEstimator) support returning confidence intervals by specifying the `conf_type` parameter ([348](https://github.com/sebp/scikit-survival/issues/348)).
- Configure package via pyproject.toml ([347](https://github.com/sebp/scikit-survival/issues/347)).
- Add support for Python 3.11 ([350](https://github.com/sebp/scikit-survival/issues/350)).
- Add support for early-stopping to [sksurv.ensemble.GradientBoostingSurvivalAnalysis](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.ensemble.GradientBoostingSurvivalAnalysis.html#sksurv.ensemble.GradientBoostingSurvivalAnalysis) ([354](https://github.com/sebp/scikit-survival/issues/354)).
- Do not use deprecated pkg_resources API ([353](https://github.com/sebp/scikit-survival/issues/353)).
- Significantly reduce memory usage of [sksurv.metrics.concordance_index_censored()](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.metrics.concordance_index_censored.html#sksurv.metrics.concordance_index_censored) ([362](https://github.com/sebp/scikit-survival/issues/362)).
- Set criterion attribute in [sksurv.tree.SurvivalTree](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.tree.SurvivalTree.html#sksurv.tree.SurvivalTree) such that [sklearn.tree.plot_tree()](https://scikit-learn.org/1.2/modules/generated/sklearn.tree.plot_tree.html#sklearn.tree.plot_tree) can be used ([366](https://github.com/sebp/scikit-survival/issues/366)).
- Significantly improve speed to fit a [sksurv.tree.SurvivalTree](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.tree.SurvivalTree.html#sksurv.tree.SurvivalTree), [sksurv.ensemble.RandomSurvivalForest](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.ensemble.RandomSurvivalForest.html#sksurv.ensemble.RandomSurvivalForest), or [sksurv.ensemble.ExtraSurvivalTrees](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.ensemble.ExtraSurvivalTrees.html#sksurv.ensemble.ExtraSurvivalTrees) ([371](https://github.com/sebp/scikit-survival/issues/371)).
- Expose `_predict_risk_score` attribute in [sklearn.pipeline.Pipeline](https://scikit-learn.org/1.2/modules/generated/sklearn.pipeline.Pipeline.html#sklearn.pipeline.Pipeline) if the final estimator of the pipeline has such property ([374](https://github.com/sebp/scikit-survival/issues/374)).
- Add support for pandas 2.0 ([373](https://github.com/sebp/scikit-survival/issues/373)).
Documentation
- Fix wrong number of selected features in the guide [Introduction to Survival Analysis](https://scikit-survival.readthedocs.io/en/v0.21.0/user_guide/00-introduction.html) ([#345](https://github.com/sebp/scikit-survival/issues/345)).
- Fix broken links with nbsphinx 0.9.2 ([367](https://github.com/sebp/scikit-survival/issues/367)).
Backwards incompatible changes
- The attribute `event_times_` of estimators has been replaced by `unique_times_` to clarify that these are all the unique times points, not just the once where an event occurred ([371](https://github.com/sebp/scikit-survival/issues/371)).
- Functions returned by `predict_cumulative_hazard_function` and `predict_survival_function` of [sksurv.tree.SurvivalTree](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.tree.SurvivalTree.html#sksurv.tree.SurvivalTree), [sksurv.ensemble.RandomSurvivalForest](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.ensemble.RandomSurvivalForest.html#sksurv.ensemble.RandomSurvivalForest), and [sksurv.ensemble.ExtraSurvivalTrees](https://scikit-survival.readthedocs.io/en/v0.21.0/api/generated/sksurv.ensemble.ExtraSurvivalTrees.html#sksurv.ensemble.ExtraSurvivalTrees) are over all unique time points passed as training data, instead of all unique time points where events occurred ([371](https://github.com/sebp/scikit-survival/issues/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](https://github.com/sebp/scikit-survival/issues/375)).
New Contributors
* dor132 made their first contribution in https://github.com/sebp/scikit-survival/pull/345
* cpoerschke made their first contribution in https://github.com/sebp/scikit-survival/pull/358
**Full Changelog**: https://github.com/sebp/scikit-survival/compare/v0.20.0...v0.21.0