Skip to content

Commit

Permalink
Merge pull request #455 from sebp/upgrade-sphinx
Browse files Browse the repository at this point in the history
Upgrade sphinx
  • Loading branch information
sebp authored May 5, 2024
2 parents 872b304 + 78c9e65 commit fc3d7f4
Show file tree
Hide file tree
Showing 27 changed files with 879 additions and 778 deletions.
2 changes: 1 addition & 1 deletion doc/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ table {
font-weight: var(--pst-font-weight-heading) !important;
}

.overview-grid .sd-card-title .fas {
.overview-grid .sd-card-title svg[data-prefix="fas"] {
position: absolute;
right: 1.2rem;
line-height: 1.4;
Expand Down
8 changes: 8 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@
"secondary_sidebar_items": ["page-toc"],
"navbar_end": ["theme-switcher.html", "navbar-github-links.html"],
"navbar_persistent": ["search-field.html"],
"navbar_align": "left",
"navigation_with_keys": False,
}

html_sidebars = {
"cite": [],
"contributing": [],
"install": [],
}

# Add any paths that contain custom themes here, relative to this directory.
Expand Down
798 changes: 25 additions & 773 deletions doc/release_notes.rst

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions doc/release_notes/v0.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _release_notes_0_1:

What's new in 0.1
=================

scikit-survival 0.1 (2016-12-29)
--------------------------------

This is the initial release of scikit-survival.
It combines the `implementation of survival support vector machines <https://github.com/tum-camp/survival-support-vector-machine>`_
with the code used in the `Prostate Cancer DREAM challenge <https://f1000research.com/articles/5-2676/>`_.
27 changes: 27 additions & 0 deletions doc/release_notes/v0.10.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. _release_notes_0_10:

What's new in 0.10
==================

scikit-survival 0.10 (2019-09-02)
---------------------------------

This release adds the `ties` argument to :class:`sksurv.linear_model.CoxPHSurvivalAnalysis`
to choose between Breslow's and Efron's likelihood in the presence of tied event times.
Moreover, :func:`sksurv.compare.compare_survival` has been added, which implements
the log-rank hypothesis test for comparing the survival function of 2 or more groups.

Enhancements
^^^^^^^^^^^^

- Update API doc of predict function of boosting estimators (#75).
- Clarify documentation for GradientBoostingSurvivalAnalysis (#78).
- Implement Efron's likelihood for handling tied event times.
- Implement log-rank test for comparing survival curves.
- Add support for scipy 1.3.1 (#66).

Bug fixes
^^^^^^^^^

- Re-add `baseline_survival_` and `cum_baseline_hazard_` attributes
to :class:`sksurv.linear_model.CoxPHSurvivalAnalysis` (#76).
38 changes: 38 additions & 0 deletions doc/release_notes/v0.11.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.. _release_notes_0_11:

What's new in 0.11
==================

scikit-survival 0.11 (2019-12-21)
---------------------------------

This release adds :class:`sksurv.tree.SurvivalTree` and :class:`sksurv.ensemble.RandomSurvivalForest`,
which are based on the log-rank split criterion.
It also adds the OSQP solver as option to :class:`sksurv.svm.MinlipSurvivalAnalysis`
and :class:`sksurv.svm.HingeLossSurvivalSVM`, which will replace the now deprecated
`cvxpy` and `cvxopt` options in a future release.

This release removes support for sklearn 0.20 and requires sklearn 0.21.

Deprecations
^^^^^^^^^^^^

- The `cvxpy` and `cvxopt` options for `solver` in :class:`sksurv.svm.MinlipSurvivalAnalysis`
and :class:`sksurv.svm.HingeLossSurvivalSVM` are deprecated and will be removed in a future
version. Choosing `osqp` is the preferred option now.

Enhancements
^^^^^^^^^^^^

- Add support for pandas 0.25.
- Add OSQP solver option to :class:`sksurv.svm.MinlipSurvivalAnalysis` and
:class:`sksurv.svm.HingeLossSurvivalSVM` which has no additional dependencies.
- Fix issue when using cvxpy 1.0.16 or later.
- Explicitly specify utf-8 encoding when reading README.rst (#89).
- Add :class:`sksurv.tree.SurvivalTree` and :class:`sksurv.ensemble.RandomSurvivalForest` (#90).

Bug fixes
^^^^^^^^^

- Exclude Cython-generated files from source distribution because
they are not forward compatible.
39 changes: 39 additions & 0 deletions doc/release_notes/v0.12.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.. _release_notes_0_12:

What's new in 0.12
==================

scikit-survival 0.12 (2020-04-15)
---------------------------------

This release adds support for scikit-learn 0.22, thereby dropping support for
older versions. Moreover, the regularization strength of the ridge penalty
in :class:`sksurv.linear_model.CoxPHSurvivalAnalysis` can now be set per
feature. If you want one or more features to enter the model unpenalized,
set the corresponding penalty weights to zero.
Finally, :class:`sklearn.pipeline.Pipeline` will now be automatically patched
to add support for `predict_cumulative_hazard_function` and `predict_survival_function`
if the underlying estimator supports it.

Deprecations
^^^^^^^^^^^^

- Add scikit-learn's deprecation of `presort` in :class:`sksurv.tree.SurvivalTree` and
:class:`sksurv.ensemble.GradientBoostingSurvivalAnalysis`.
- Add warning that default `alpha_min_ratio` in :class:`sksurv.linear_model.CoxnetSurvivalAnalysis`
will depend on the ratio of the number of samples to the number of features
in the future (#41).

Enhancements
^^^^^^^^^^^^

- Add references to API doc of :class:`sksurv.ensemble.GradientBoostingSurvivalAnalysis` (#91).
- Add support for pandas 1.0 (#100).
- Add `ccp_alpha` parameter for
`Minimal Cost-Complexity Pruning <https://scikit-learn.org/stable/modules/tree.html#minimal-cost-complexity-pruning>`_
to :class:`sksurv.ensemble.GradientBoostingSurvivalAnalysis`.
- Patch :class:`sklearn.pipeline.Pipeline` to add support for
`predict_cumulative_hazard_function` and `predict_survival_function`
if the underlying estimator supports it.
- Allow per-feature regularization for :class:`sksurv.linear_model.CoxPHSurvivalAnalysis` (#102).
- Clarify API docs of :func:`sksurv.metrics.concordance_index_censored` (#96).
94 changes: 94 additions & 0 deletions doc/release_notes/v0.13.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
.. _release_notes_0_13:

What's new in 0.13
==================

scikit-survival 0.13.1 (2020-07-04)
-----------------------------------

This release fixes warnings that were introduced with 0.13.0.

Bug fixes
^^^^^^^^^

- Explicitly pass ``return_array=True`` in :meth:`sksurv.tree.SurvivalTree.predict`
to avoid FutureWarning.
- Fix error when fitting :class:`sksurv.tree.SurvivalTree` with non-float
dtype for time (#127).
- Fix RuntimeWarning: invalid value encountered in true_divide
in :func:`sksurv.nonparametric.kaplan_meier_estimator`.
- Fix PendingDeprecationWarning about use of matrix when fitting
:class:`sksurv.svm.FastSurvivalSVM` if optimizer is `PRSVM` or `simple`.


scikit-survival 0.13.0 (2020-06-28)
-----------------------------------

The highlights of this release include the addition of
:func:`sksurv.metrics.brier_score` and
:func:`sksurv.metrics.integrated_brier_score`
and compatibility with scikit-learn 0.23.

`predict_survival_function` and `predict_cumulative_hazard_function`
of :class:`sksurv.ensemble.RandomSurvivalForest` and
:class:`sksurv.tree.SurvivalTree` can now return an array of
:class:`sksurv.functions.StepFunction`, similar
to :class:`sksurv.linear_model.CoxPHSurvivalAnalysis`
by specifying ``return_array=False``. This will be the default
behavior starting with 0.14.0.

Note that this release fixes a bug in estimating
inverse probability of censoring weights (IPCW), which will
affect all estimators relying on IPCW.

Enhancements
^^^^^^^^^^^^

- Make build system compatible with PEP-517/518.
- Added :func:`sksurv.metrics.brier_score` and
:func:`sksurv.metrics.integrated_brier_score` (#101).
- :class:`sksurv.functions.StepFunction` can now be evaluated at multiple points
in a single call.
- Update documentation on usage of `predict_survival_function` and
`predict_cumulative_hazard_function` (#118).
- The default value of `alpha_min_ratio` of
:class:`sksurv.linear_model.CoxnetSurvivalAnalysis` will now depend
on the `n_samples/n_features` ratio.
If ``n_samples > n_features``, the default value is 0.0001
If ``n_samples <= n_features``, the default value is 0.01.
- Add support for scikit-learn 0.23 (#119).

Deprecations
^^^^^^^^^^^^

- `predict_survival_function` and `predict_cumulative_hazard_function`
of :class:`sksurv.ensemble.RandomSurvivalForest` and
:class:`sksurv.tree.SurvivalTree` will return an array of
:class:`sksurv.functions.StepFunction` in the future
(as :class:`sksurv.linear_model.CoxPHSurvivalAnalysis` does).
For the old behavior, use `return_array=True`.

Bug fixes
^^^^^^^^^

- Fix deprecation of importing joblib via sklearn.
- Fix estimation of censoring distribution for tied times with events.
When estimating the censoring distribution,
by specifying ``reverse=True`` when calling
:func:`sksurv.nonparametric.kaplan_meier_estimator`,
we now consider events to occur before censoring.
For tied time points with an event, those
with an event are not considered at risk anymore and subtracted from
the denominator of the Kaplan-Meier estimator.
The change affects all functions relying on inverse probability
of censoring weights, namely:

- :class:`sksurv.nonparametric.CensoringDistributionEstimator`
- :func:`sksurv.nonparametric.ipc_weights`
- :class:`sksurv.linear_model.IPCRidge`
- :func:`sksurv.metrics.cumulative_dynamic_auc`
- :func:`sksurv.metrics.concordance_index_ipcw`

- Throw an exception when trying to estimate c-index from incomparable data (#117).
- Estimators in ``sksurv.svm`` will now throw an
exception when trying to fit a model to data with incomparable pairs.
49 changes: 49 additions & 0 deletions doc/release_notes/v0.14.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.. _release_notes_0_14:

What's new in 0.14
==================

scikit-survival 0.14.0 (2020-10-07)
-----------------------------------

This release features a complete overhaul of the :doc:`documentation <../index>`.
It features a new visual design, and the inclusion of several interactive notebooks
in the :ref:`User Guide`.

In addition, it includes important bug fixes.
It fixes several bugs in :class:`sksurv.linear_model.CoxnetSurvivalAnalysis`
where ``predict``, ``predict_survival_function``, and ``predict_cumulative_hazard_function``
returned wrong values if features of the training data were not centered.
Moreover, the `score` function of :class:`sksurv.ensemble.ComponentwiseGradientBoostingSurvivalAnalysis`
and :class:`sksurv.ensemble.GradientBoostingSurvivalAnalysis` will now
correctly compute the concordance index if ``loss='ipcwls'`` or ``loss='squared'``.

Bug fixes
^^^^^^^^^

- :func:`sksurv.column.standardize` modified data in-place. Data is now always copied.
- :func:`sksurv.column.standardize` works with integer numpy arrays now.
- :func:`sksurv.column.standardize` used biased standard deviation for numpy arrays (``ddof=0``),
but unbiased standard deviation for pandas objects (``ddof=1``). It always uses ``ddof=1`` now.
Therefore, the output, if the input is a numpy array, will differ from that of previous versions.
- Fixed :meth:`sksurv.linear_model.CoxnetSurvivalAnalysis.predict_survival_function`
and :meth:`sksurv.linear_model.CoxnetSurvivalAnalysis.predict_cumulative_hazard_function`,
which returned wrong values if features of training data were not already centered.
This adds an ``offset_`` attribute that accounts for non-centered data and is added to the
predicted risk score. Therefore, the outputs of ``predict``, ``predict_survival_function``,
and ``predict_cumulative_hazard_function`` will be different to previous versions for
non-centered data (#139).
- Rescale coefficients of :class:`sksurv.linear_model.CoxnetSurvivalAnalysis` if
`normalize=True`.
- Fix `score` function of :class:`sksurv.ensemble.ComponentwiseGradientBoostingSurvivalAnalysis`
and :class:`sksurv.ensemble.GradientBoostingSurvivalAnalysis` if ``loss='ipcwls'`` or ``loss='squared'``
is used. Previously, it returned ``1.0 - true_cindex``.

Enhancements
^^^^^^^^^^^^

- Add :func:`sksurv.show_versions` that prints the version of all dependencies.
- Add support for pandas 1.1
- Include interactive notebooks in documentation on readthedocs.
- Add user guide on `penalized Cox models <user_guide/coxnet.ipynb>`_.
- Add user guide on `gradient boosted models <user_guide/boosting.ipynb>`_.
68 changes: 68 additions & 0 deletions doc/release_notes/v0.15.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
.. _release_notes_0_15:

What's new in 0.15
==================

scikit-survival 0.15.0 (2021-03-20)
-----------------------------------

This release adds support for scikit-learn 0.24 and Python 3.9.
scikit-survival now requires at least pandas 0.25 and scikit-learn 0.24.
Moreover, if :class:`sksurv.ensemble.GradientBoostingSurvivalAnalysis`.
or :class:`sksurv.ensemble.ComponentwiseGradientBoostingSurvivalAnalysis`
are fit with ``loss='coxph'``, `predict_cumulative_hazard_function` and
`predict_survival_function` are now available.
:func:`sksurv.metrics.cumulative_dynamic_auc` now supports evaluating
time-dependent predictions, for instance for a :class:`sksurv.ensemble.RandomSurvivalForest`
as illustrated in the
:ref:`User Guide </user_guide/evaluating-survival-models.ipynb#Using-Time-dependent-Risk-Scores>`.

Bug fixes
^^^^^^^^^
- Allow passing pandas data frames to all ``fit`` and ``predict`` methods (#148).
- Allow sparse matrices to be passed to
:meth:`sksurv.ensemble.GradientBoostingSurvivalAnalysis.predict`.
- Fix example in user guide using GridSearchCV to determine alphas for CoxnetSurvivalAnalysis (#186).

Enhancements
^^^^^^^^^^^^
- Add score method to :class:`sksurv.meta.Stacking`,
:class:`sksurv.meta.EnsembleSelection`, and
:class:`sksurv.meta.EnsembleSelectionRegressor` (#151).
- Add support for `predict_cumulative_hazard_function` and
`predict_survival_function` to :class:`sksurv.ensemble.GradientBoostingSurvivalAnalysis`.
and :class:`sksurv.ensemble.ComponentwiseGradientBoostingSurvivalAnalysis`
if model was fit with ``loss='coxph'``.
- Add support for time-dependent predictions to :func:`sksurv.metrics.cumulative_dynamic_auc`
See the :ref:`User Guide </user_guide/evaluating-survival-models.ipynb#Using-Time-dependent-Risk-Scores>`
for an example (#134).

Backwards incompatible changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- The score method of :class:`sksurv.linear_model.IPCRidge`,
:class:`sksurv.svm.FastSurvivalSVM`, and :class:`sksurv.svm.FastKernelSurvivalSVM`
(if ``rank_ratio`` is smaller than 1) now converts predictions on log(time) scale
to risk scores prior to computing the concordance index.
- Support for cvxpy and cvxopt solver in :class:`sksurv.svm.MinlipSurvivalAnalysis`
and :class:`sksurv.svm.HingeLossSurvivalSVM` has been dropped. The default solver
is now ECOS, which was used by cvxpy (the previous default) internally. Therefore,
results should be identical.
- Dropped the ``presort`` argument from :class:`sksurv.tree.SurvivalTree`
and :class:`sksurv.ensemble.GradientBoostingSurvivalAnalysis`.
- The ``X_idx_sorted`` argument in :meth:`sksurv.tree.SurvivalTree.fit`
has been deprecated in scikit-learn 0.24 and has no effect now.
- `predict_cumulative_hazard_function` and
`predict_survival_function` of :class:`sksurv.ensemble.RandomSurvivalForest`
and :class:`sksurv.tree.SurvivalTree` now return an array of
:class:`sksurv.functions.StepFunction` objects by default.
Use ``return_array=True`` to get the old behavior.
- Support for Python 3.6 has been dropped.
- Increase minimum supported versions of dependencies. We now require:

+--------------+-----------------+
| Package | Minimum Version |
+==============+=================+
| Pandas | 0.25.0 |
+--------------+-----------------+
| scikit-learn | 0.24.0 |
+--------------+-----------------+
Loading

0 comments on commit fc3d7f4

Please sign in to comment.