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

Add Cox Objective #464

Open
jordan-melendez opened this issue Oct 12, 2021 · 3 comments
Open

Add Cox Objective #464

jordan-melendez opened this issue Oct 12, 2021 · 3 comments

Comments

@jordan-melendez
Copy link

Would there be any interest in the addition of the Cox Proportional Hazards loss for modeling survival data?

@MarcAntoineSchmidtQC
Copy link
Member

Absolutely. This is not on the radar in the short term, but a PR is very welcome if you want to take a shot at it.

@jordan-melendez
Copy link
Author

Great -- I just might!

@MatthiasSchmidtblaicherQC
Copy link
Contributor

MatthiasSchmidtblaicherQC commented Mar 15, 2022

I thought of giving this a shot, but first we need to clarify something: the Cox partial likelihood is not an EDM. The solvers in glum are built around the EDM assumption, so I don't see how we can easily incorporate this objective.

A Cox Proportional Hazard can be estimated with a Poisson GLM via a data transformation. The Cox objective is equivalent to the Poisson likelihood with a fixed effect for each event time and this fixed effect profiled out, see an explanation here). The transformation is to cut the observation into small subperiods, corresponding to event occurrences (in R, this is survSplit). Is such a data transformation a useful addition to glum or is this too far removed from the core functionality? @MarcAntoineSchmidtQC @tbenthompson

MartinStancsicsQC added a commit that referenced this issue May 31, 2023
Useful for discrete time survival models.
Somewhat related to #464.
More info: https://grodri.github.io/glms/notes/c7s6
MartinStancsicsQC added a commit that referenced this issue Jun 7, 2023
Useful for discrete time survival models.
Somewhat related to #464.
More info: https://grodri.github.io/glms/notes/c7s6
MartinStancsicsQC added a commit that referenced this issue Jun 12, 2023
Useful for discrete time survival models.
Somewhat related to #464.
More info: https://grodri.github.io/glms/notes/c7s6
MartinStancsicsQC added a commit that referenced this issue Jun 12, 2023
* Add cloglog link function

Useful for discrete time survival models.
Somewhat related to #464.
More info: https://grodri.github.io/glms/notes/c7s6

* Improve numerical accuracy

* Fix tests (restrict test values)

* Add 'cloglog' to `GeneralizedLinearRegressor` opts

* Add changelog entry

* Apply suggestions from code review

Fix docstrings

Co-authored-by: Luca Bittarello <[email protected]>

* Add test cloglog test against other packages

---------

Co-authored-by: Luca Bittarello <[email protected]>
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

No branches or pull requests

3 participants