[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate new version of the model that jointly models the competing risk incidences #53

Merged
merged 77 commits into from
Aug 20, 2024

Conversation

ogrisel
Copy link
Contributor
@ogrisel ogrisel commented Jul 1, 2024

This involves renaming the model class to SurvivalBoost as a short and easy to remember name.

juAlberge and others added 30 commits June 19, 2024 12:07
glemaitre and others added 19 commits July 3, 2024 16:10
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
DOC documents parameters in SurvivalBoost docstring
…oost

API change the shape of the incidence curves
DOC Use data generator in marginal cumulative incidence example
@ogrisel
Copy link
Contributor Author
ogrisel commented Jul 4, 2024

@juAlberge @Vincent-Maladiere @judithabk6 I think this branch is in a good enough shape to be reviewed for merging.

  • it exposes the new multi-incidence estimator with the new SurvivalBoost as decided during the sprint,
  • it updated the tests and example to match the new API;
  • it removed things that are not covered by the tests;
  • it hides the IPCW estimator API to keep it private for now. I plan to open a dedicated PR to implement the generic wrapper we discussed with @judithabk6 at the sprint but this is better done in a dedicated PR.

Note: I also updated the marginal competing risk estimation example to use KM based IPCW as this example is a case of a marginal censoring mechanism. Using KM-IPCW really improves the quality of the plots on censored data. Even when tweaking the other hyper-parameters I could not get the alternating IPCW strategy to work well on this example. This will also be investigated later.

@Vincent-Maladiere Vincent-Maladiere mentioned this pull request Jul 9, 2024
5 tasks
Vincent-Maladiere

This comment was marked as resolved.

juAlberge and others added 2 commits August 15, 2024 18:58
* survival analysis example

* change the `predict_cumutive_incidence` function to `predict_survival_function`

* fix the example and adapt it to sphinx

* add torch to doc deps because because pycox doesn't require it

* clean example

---------

Co-authored-by: LeoGrin <leo.grinsztajn@polytechnique.edu>
Co-authored-by: Vincent Maladiere <maladiere.vincent@yahoo.fr>
Copy link
Collaborator
@Vincent-Maladiere Vincent-Maladiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

@Vincent-Maladiere Vincent-Maladiere merged commit 5e581d5 into main Aug 20, 2024
9 checks passed
@Vincent-Maladiere Vincent-Maladiere deleted the multi-incidence branch August 20, 2024 16:47
github-actions bot pushed a commit that referenced this pull request Aug 20, 2024
…competing risk incidences (#53)

* removing Incidence

* adding MultiIncidence to hazardosu

* reinserting example for multiincidence

* Hardcode uniform time sampler to simplify estimator

* Remove any reference to the dataset-specific oracle scorer

* Rename to SurvivalBoost

* Update the .score method to work in the any event setting

* Rename test file

* Fix test_gradient_boosting_incidence_parameter_tuning

* Simplify code

* Raise error if hard-zero resampling censors too many events

* adding test

* Refactor survival boost tests

* Fix missing assertion

* fix TODO

* fix linter

* Fix LaTeX

* More informative error message for bad value for hard_zero_fraction

* Remove untested code related to Cox PH based conditional censoring estimation

* Avoid using 'Est' as a short hand for 'Estimator'

* FIX accept both float and array-like for time_horizon in predict_proba

* DOC update predict_proba docstring

* TST add a test that check the behaviour of predict_proba

* DOC add docstring to test

* TST check that probability sum to one for all events

* DOC fix docstring type for time_horizon

* Rename BaseIPCW to KaplanMeierIPCW. Adding some documentation.

* API correct the API of predict_proba

* Use arturo formulation

* Silence 'DeprecationWarning: invalid escape sequence' by using raw docstrings with LaTeX expressions

* update docstring

* Simplify KaplanMeierIPCW and improve its docstring

* adding some documentation to SurvivalBoost

* More docstring fixes

* Apply suggestions from code review

Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>

* TST update test and code to follow scikit-learn convention

* TST check that we override properly

* Apply suggestions from code review

Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>

* DOC start documenting parameter

* DOC documents parameters in SurvivalBoost docstring

* DOC add ipcw estimator docstring

* DOC add attributes, reference, and examples

* DOC document some parameters and attributes of WeightedMultiClassTargetSampler

* API change the shape of the incidence curves

* DOC Use data generator in marginal cumulative incidence example

* FIX slice properly the prediction

* fix install instructions with flit

* MAINT Remove old python version in black config (#57)

* MAINT activate doctest check with pytest by default

* Fix a pandas warning in load_seer

* FIX do not pytest collect outside of the hazardous module folder

* FIX update the example to integrate on the right columns

* Apply suggestions from code review

Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>

* Set explicit value for n_events

* Improve variable names and comments in WeightedMultiClassTargetSampler

* Use n_horizons_per_observation=3 by default

* Update hazardous/_survival_boost.py

* Remove reference to "column" to describe the second axis of a 3D array.

* Improve docstrings for SurvivalBoost

* Make sure to use zero-width param ranges in marginal example

* Silence AJ warning on tied events

* Small improvements

* Use a string in the public API of SurvivalBoost to select the censoring estimator

* Keep IPCW estimator private API for now

* replacing any occurence of _est to _estimator

* fixing math, harmonising different notations.

* Example survival analysis (#70)

* survival analysis example

* change the `predict_cumutive_incidence` function to `predict_survival_function`

* fix the example and adapt it to sphinx

* add torch to doc deps because because pycox doesn't require it

* clean example

---------

Co-authored-by: LeoGrin <leo.grinsztajn@polytechnique.edu>
Co-authored-by: Vincent Maladiere <maladiere.vincent@yahoo.fr>

* enhance documentation

---------

Co-authored-by: Julie Alberge <julie.alberge@gmail.com>
Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
Co-authored-by: ArturoAmorQ <arturo.amor-quiroz@polytechnique.edu>
Co-authored-by: Judith Abecassis <judithabk6@users.noreply.github.com>
Co-authored-by: Jovan Stojanovic <62058944+jovan-stojanovic@users.noreply.github.com>
Co-authored-by: Julie <107467312+juAlberge@users.noreply.github.com>
Co-authored-by: LeoGrin <leo.grinsztajn@polytechnique.edu>
Co-authored-by: Vincent Maladiere <maladiere.vincent@yahoo.fr> 5e581d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants