Search code examples
pythonsurvival-analysislifelines

How to set "step_size" to a smaller value? because I got ConvergenceWarning: Newton-Rhaphson failed to converge sufficiently


In the estimation of CoxPH model I got the following error: ConvergenceWarning: Newton-Rhaphson failed to converge sufficiently.

In the documentation they talks about setting "step_size" to smaller value,

I coudn't find where I can use "fit_options" and "step_size"


Solution

  • Setting it directly as a parameter in the fit-method of the model class is apparently no longer possible as of lifelines version 0.27.1. You'll have to work with the fit_options in the method, or use an older version of the package.