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 frames to return hazard and/or survival functions to coxPH corresponding to input dataset #15661

Open
wendycwong opened this issue Jul 27, 2023 · 2 comments
Assignees

Comments

@wendycwong
Copy link
Contributor

Current CoxPH predict function will only return exp(beta * covariate). However, it will be helpful to also return the hazard or survival functions as well if the user will choose to have it.

@wendycwong
Copy link
Contributor Author

A good reference on what to include for our CoxPH model is:

They did mention one library based on XgBoost as a good example of full tool set for survival analysis: https://github.com/loft-br/xgboost-survival-embeddings

@wendycwong wendycwong self-assigned this Oct 11, 2023
@wendycwong wendycwong changed the title Add frames to return hazard and/or survival functions to coxPH Add frames to return hazard and/or survival functions to coxPH corresponding to input dataset Oct 7, 2024
@wendycwong
Copy link
Contributor Author

actually, coxPH already return baseline hazard frame and baseline survival frames. If your model is called model, you get them by calling:

model.baseline_hazard_frame and model.baseline_survival_frame.

However, these are calculated as a function of time unit t and not correspond to each row of the dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant