I am getting the same Convergence cycle detected warning running a quantile regression with statsmodels.regression.quantile_regression as in here:

ConvergenceWarning: Convergence cycle detected  
warnings.warn("Convergence cycle detected", ConvergenceWarning)

I think it means that the convex optimizer keeps hopping from one side to the other of the optimal point without improving on the target function until reaches the maximum number of iterations allowed.

IterationLimitWarning: Maximum number of iterations (1000) reached.  

I am not sure how I can hack into this to avoid this warning.

  • $\begingroup$ You're asking about preventing the cycle from happening and making the optimization run better, not merely suppressing the warning, right? $\endgroup$
    – Danica
    Apr 9, 2015 at 16:32
  • 2
    $\begingroup$ I would also be interested in a general answer, since I don't know exactly why these convergence cycles occur. I opened an issue with statsmodels github.com/statsmodels/statsmodels/issues/2357 to track this. statsmodels currently doesn't allow a choice of initial values for the optimization in QuantileRegression. My best guess is either to restart the optimization with random perturbations or to smoothly approximate the L1 loss function which causes the problems. $\endgroup$
    – Josef
    Apr 18, 2015 at 0:25


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.