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

code for predicting risk scores #19

Open
sjjadsa opened this issue Feb 19, 2025 · 2 comments
Open

code for predicting risk scores #19

sjjadsa opened this issue Feb 19, 2025 · 2 comments

Comments

@sjjadsa
Copy link

sjjadsa commented Feb 19, 2025

could u please release the code for predicting risk scores,especially using the model from each and predict the correspoding validation set.thanks

We do not provide the code for drawing KM curves as it is pretty standard code from lifelines. However, here's an overview of the process. We first use the model from each fold post training to predict the risk scores on the validation set for that fold. Then we concat the risk scores for all of the validation folds, giving us the risk scores for the entire dataset. We then use lifelines to fit a KM fitter and plot in 2 risk groups (high and low). The same package is used to perform the logrank statistical test between risk groups as well.

Please let us know if something is unclear and we would be happy to help!

Originally posted by @ajv012 in #15

@guillaumejaume
Copy link
Contributor

From the logits, the risks are calculated as:

https://github.com/mahmoodlab/SurvPath/blob/main/utils/core_utils.py#L409

@sjjadsa
Copy link
Author

sjjadsa commented Feb 24, 2025

thank u

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