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

How the KM curve is drawn? #15

Open
hljWmh opened this issue Dec 13, 2024 · 3 comments
Open

How the KM curve is drawn? #15

hljWmh opened this issue Dec 13, 2024 · 3 comments

Comments

@hljWmh
Copy link

hljWmh commented Dec 13, 2024

I didn't quite understand, is this KM curve drawn with validation set data or training set? Is there any specific code for this, as the article doesn't explain this in detail. After the 5-fold cross-training, is the one with the best results chosen to draw the KM curve?

@ajv012
Copy link
Collaborator

ajv012 commented Dec 16, 2024

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!

@hljWmh
Copy link
Author

hljWmh commented Dec 17, 2024 via email

@XiaoXueShengwangrui
Copy link

I didn't quite understand, is this KM curve drawn with validation set data or training set? Is there any specific code for this, as the article doesn't explain this in detail. After the 5-fold cross-training, is the one with the best results chosen to draw the KM curve?

您好,请问您解决了绘制KM曲线的问题了吗?能否分享一下代码呀~

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