-
Hi there, I got an error when using this code: surv = coxph.predict_survival_function(X_test, return_array=True)
for i, s in enumerate(surv):
plt.step(coxph.unique_times_, s, where="post")
plt.ylabel("Survival probability")
plt.xlabel("Time in months")
# plt.grid(True)
plt.show() I am not sure what happens. Thank you for the amazing package. |
Beta Was this translation helpful? Give feedback.
Answered by
sebp
Sep 17, 2023
Replies: 1 comment 5 replies
-
The |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can reproduce this issue if
y
passed tofit
contains an event with time-1
. This should actually already thrown an exception duringfit
, because time points must be non-negative.See #406