RaphaelS1 / survivalmodels

Implementations of survival models in R
https://raphaels1.github.io/survivalmodels/
Other
57 stars 13 forks source link

Could deep_cox_mixtures be added to the library? #17

Closed flippercy closed 8 months ago

flippercy commented 3 years ago

Hi @RaphaelS1 :

Could you add deep cox mixtures (https://github.com/chiragnagpal/deep_cox_mixtures) to the 'survival model zoo', please?

Thank you!

RaphaelS1 commented 3 years ago

Hi and thanks for your interest in the package,

It's quite a lot of work adding new models to this package, especially when they're not already on Python; in fact I'm not sure how well reticulate handles code from GitHub. Can you please justify the work that would go into doing this by telling me about the model, how it works, why it's better than competitors/serves different use-cases, and how you would use it? Of course I also welcome contributors so if you'd like to try implementing this yourself that would be greatly appreciated!!

Thanks!

flippercy commented 3 years ago

Hi @RaphaelS1:

Thank you for your response and sorry for my delay.

As explained in the paper at https://arxiv.org/pdf/2101.06536.pdf, deep cox mixtures is a unique algorithm of survival analysis handling both ranking risks and calibrating the exact survival curve for each individual well. Most algorithms only focus on the former, making them unusable when the goal is to forecast the number of events for each time window (for example, some clinical analyses request the model to be able to forecast the # of death in each period after the trial starts). DCM does so by clustering the records into different groups and then fitting the proportional hazard model for each group using deep neural networks.

Appreciate your help!

RaphaelS1 commented 3 years ago

Thanks @flippercy.

I definitely like the idea of a model optimising calibration and discrimination simultaneously but would like to see if their results are reproducible with true survival predictions (distributions etc.). That aside whilst I'm happy to implement it, it still isn't as simple as the others which are already off-shelf; this would require copying the source files and re-building the Python tensorflow interface within reticulate, which isn't simple.

This is on my to-do list but might be a while until I get around to it; it'll get higher in the list if more interest grows

flippercy commented 3 years ago

Hi @RaphaelS1:

Thank you for the reply! Really appreciate your effort to put all these things together!

Best,

chiragnagpal commented 3 years ago

Hi ! I am the first author on the Deep Cox Mixture (DCM) paper.

I just saw this thread, and thought I will update you all that I have a more stable pytorch version of DCM as part of the Deep Survival Machines package: https://github.com/autonlab/DeepSurvivalMachines/blob/master/dsm/contrib/dcm_api.py

I would be happy to discuss integration with https://github.com/RaphaelS1/survivalmodels ; if this is still in the pipeline.

chiragnagpal commented 3 years ago

FWIW, DSM and DCM have very simple to use APIs which are almost like pycox. Please see here:

https://autonlab.github.io/DeepSurvivalMachines/

RaphaelS1 commented 3 years ago

Hi @chiragnagpal ! Thanks for posting here this certainly makes the job of integrating into R much easier. I'll try and take a look at this properly this week or next and will definitely message if I have questions :)

flippercy commented 3 years ago

Thank you for collaborating @chiragnagpal , @RaphaelS1 !

RaphaelS1 commented 8 months ago

Not looking to add anymore Python integrations, hopefully some day everything will be reimplemented in R