You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CoxPHSurvivalAnalysis can be fit with negative observe time points. It only fails during prediction. However, by definition time should be non-negative and fit should throw an exception.
Traceback (most recent call last):
File "/home/sebp/Projekte/scikit-survival/cph_neg.py", line 15, in <module>
cph.predict_survival_function(X[:2], return_array=True)
File "/home/sebp/Projekte/scikit-survival/sksurv/linear_model/coxph.py", line 618, in predict_survival_function
return self._predict_survival_function(self._baseline_model, self.predict(X), return_array)
File "/home/sebp/Projekte/scikit-survival/sksurv/base.py", line 49, in _predict_survival_function
return self._predict_function("get_survival_function", baseline_model, prediction, return_array)
File "/home/sebp/Projekte/scikit-survival/sksurv/base.py", line 26, in _predict_function
arr[i, :] = fn(times)
File "/home/sebp/Projekte/scikit-survival/sksurv/functions.py", line 95, in __call__
raise ValueError(f"x must be within [{self.domain[0]:f}; {self.domain[1]:f}]")
ValueError: x must be within [0.000000; 7.000000]
CoxPHSurvivalAnalysis
can be fit with negative observe time points. It only fails during prediction. However, by definition time should be non-negative andfit
should throw an exception.Discussed in #404
The text was updated successfully, but these errors were encountered: