lbfgs has only pgtol? scipy has ftol, gtol.

103 views
Skip to first unread message

Stuart Reynolds

unread,
Oct 6, 2017, 2:49:40 PM10/6/17
to pystatsmodels
Are the optional parameters to optimizers in statsmodels intended to map exactly to those in scipy?

http://www.statsmodels.org/dev/generated/statsmodels.discrete.discrete_model.Logit.fit.html#statsmodels.discrete.discrete_model.Logit.fit
says for 'lbfgs':
    pgtol : float
        A stop condition that uses the projected gradient.

ftol : float

The iteration stops when (f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= ftol.

gtol : float

The iteration will stop when max{|proj g_i | i = 1, ..., n} <= gtol where pg_i is the i-th component of the projected gradient.


... but has not pgtol. 


Thanks
- Stu

josef...@gmail.com

unread,
Oct 6, 2017, 3:03:33 PM10/6/17
to pystatsmodels
Our optimizers go through the original functions, our setup was written before `minimize` was added to scipy. I'm not sure how the options in `minimize` work (and whether they use callbacks to implement extra convergence criteria), but the relevant documentation for our wrapper are the fmin_xxx functions

which has pgtol but not the other ones.

In statsmodels master, we have `minimize` itself connected to the likelihood models.
This works also for the old optimizers like the default for minimize is to use bfgs. In that case, whatever options are available in scipy's minimize should be available through the **kwargs of fit.

e.g.

        res_dog = model.fit(start_params=start_params,
                            method='minimize', min_method="dogleg",
                            maxiter=500, disp=0)


Josef
 


Thanks
- Stu


Reply all
Reply to author
Forward
0 new messages