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

Multivariate and regularized CoxPH models #744

Open
mhaist94 opened this issue Jun 1, 2024 · 2 comments
Open

Multivariate and regularized CoxPH models #744

mhaist94 opened this issue Jun 1, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@mhaist94
Copy link

mhaist94 commented Jun 1, 2024

Description of feature

Hi all,

thanks for taking your time digging through my requests:
Another important points (at least for clinicians, I will get to some more biology-focused features later) would be the implementation of multivariate CoxPH models that take into account multiple variables that might affect your time-to-event endpoint.
One of those (that is though limited in terms of the model fitting accuracy, and thus should not be employed with more than 5 variables at a time) is described in the SurvivalAnalysis (analyse_multivariate function, see https://cran.r-project.org/web/packages/survivalAnalysis/vignettes/multivariate.html) package in R or again in the survminer package in R (here its a coxph function if I recall correctly).
To fit more parameters into a multivariate model (which is rarely done), one usually employs regularized CoxPH models (for example LASSO regularized models, which is implmented in the glmnet package in R, see https://glmnet.stanford.edu/articles/glmnet.html). This is not a must-have - but given that the utility of ehrapy is particularly in the dissection of big heterogeneous datasets regularized models might be an idea worthwhile considering.

@mhaist94 mhaist94 added the enhancement New feature or request label Jun 1, 2024
@eroell
Copy link
Collaborator

eroell commented Dec 11, 2024

lifeline's CoxPHFitter, which ep.tl.cox_ph uses, does support multivariate CoxPH models already if I understood the request correctly; also, CoxPHFitterdoes allow for regularization, for example lasso, via the penalizer argument and the l1_ratio.

However, p.tl.cox_ph right now does not pass these arguments through; Extending the arguments passed to CoxPH here would make a lot of sense, and address this issue.

@eroell
Copy link
Collaborator

eroell commented Dec 11, 2024

And, we could show the effect of this regularization also in the survival analysis notebook to highlight this option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants