statsmodels.base.optimizer._fit_lbfgs¶
- statsmodels.base.optimizer._fit_lbfgs(f, score, start_params, fargs, kwargs, disp=True, maxiter=100, callback=None, retall=False, full_output=True, hess=None)[source]¶
Fit using Limited-memory Broyden-Fletcher-Goldfarb-Shannon algorithm.
- Parameters:
- f
function
Returns negative log likelihood given parameters.
- score
function
Returns gradient of negative log likelihood with respect to params.
- start_paramsarray_like,
optional
Initial guess of the solution for the loglikelihood maximization. The default is an array of zeros.
- fargs
tuple
Extra arguments passed to the objective function, i.e. objective(x,*args)
- kwargs
dict
[str
,Any
] Extra keyword arguments passed to the objective function, i.e. objective(x,**kwargs)
- dispbool
Set to True to print convergence messages.
- maxiter
int
The maximum number of iterations to perform.
- callback
callable
callback
(xk
) Called after each iteration, as callback(xk), where xk is the current parameter vector.
- retallbool
Set to True to return list of solutions at each iteration. Available in Results object’s mle_retvals attribute.
- full_outputbool
Set to True to have all available output in the Results object’s mle_retvals attribute. The output is dependent on the solver. See LikelihoodModelResults notes section for more information.
- hess
str
,optional
Method for computing the Hessian matrix, if applicable.
- f
- Returns:
Notes
Within the mle part of statsmodels, the log likelihood function and its gradient with respect to the parameters do not have notationally consistent sign.