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

Calculate the predicted risk score for each patient #122

Closed
leonadoan opened this issue Jan 16, 2022 · 2 comments
Closed

Calculate the predicted risk score for each patient #122

leonadoan opened this issue Jan 16, 2022 · 2 comments

Comments

@leonadoan
Copy link

Hi, first of all, thank you very much for developing such a useful package. It helps me a lot in my survival analysis.

I have a question regarding the prediction of the neural network. I applied COXPH for my model and .predict_surv_df() to predict my test set. The prediction would return the survival function for each patient. I would like to classify patients in the test set to high-risk and low-risk groups based on their risk scores. Is there any way to calculate the risk score for each patient based on the predicted survival function from the COXPH?

@havakv
Copy link
Owner

havakv commented Jan 23, 2022

Hi, and thank you for the kind words.

Could you maybe provide a definition of the risk score? If you just want a to create a risk score, you could for instance use the survival prediction at a fixed point in time or just the model.predict(x) (essentially represents the log-partial hazard https://lifelines.readthedocs.io/en/latest/Survival%20Regression.html#cox-s-proportional-hazard-model). You can use these because CoxPH is a proportional hazard model, meaning the relative risk between two individuals are constant as a function of time (survival function will never cross).
Does this answer your question?

@leonadoan
Copy link
Author

That's awesome, and absolutely what I'm looking for. Thank you very much for your help.

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

2 participants