Skip to content

cumulative_dynamic_auc,RuntimeWarning: invalid value encountered in divide true_pos = cumsum_tp / cumsum_tp[-1] #507

Answered by sebp
yangfan0404 asked this question in Q&A
Discussion options

You must be logged in to vote

The problem is times, i.e. the time points where the time-dependent ROC is evaluated. The first entry is 0, but the first event in survival_test occurs at time 3.5. Hence, at time point 0 all samples are censored and there is no information which are the cases and which are the controls.

This should be checked in cumulative_dynamic_auc and throw an exception that explains why this happened.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@yangfan0404
Comment options

@sebp
Comment options

sebp Jan 31, 2025
Maintainer

Answer selected by yangfan0404
@yangfan0404
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants