pysurvival
pysurvival copied to clipboard
Time bucket error after fitting coxph
I tried to fit CoxPHModel with my own dataset. I am sure that the format for X, T, and E vectors are correct. However, I got "AttributeError: The time axis needs to be created before using the method get_time_buckets." after optimization reached max number of iterations. How can I solve this problem?
I had the same issue. Somehow it seemed to be due to a mistake of mine, I had passed time and censoring arrays that were only one item long. For this, the code could be potentially improved by checking the consistency of all input array dimensions. I hope this helps.