pysurvival icon indicating copy to clipboard operation
pysurvival copied to clipboard

Time bucket error after fitting coxph

Open FSNStefan opened this issue 5 years ago • 1 comments

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?

FSNStefan avatar Aug 26 '19 02:08 FSNStefan

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.

diego-s avatar Dec 23 '19 13:12 diego-s