stanbkt.fits.MLEFitOptions#
- class stanbkt.fits.MLEFitOptions(seed=None, extra_kwargs=<factory>, algorithm=None, iter=2000, jacobian=False, tol_obj=None, tol_rel_obj=None, tol_grad=None, tol_rel_grad=None, tol_param=None, history_size=None)#
Bases:
BaseFitOptionsCommon options for
cmdstanpy.CmdStanModel.optimize().- Parameters:
algorithm (
str|None) – Optimization algorithm (for example,"lbfgs","bfgs", or"newton").iter (
int) – Maximum number of optimization iterations.jacobian (
bool) – Whether to include Jacobian adjustment for constrained parameters.tol_obj (
float|None) – Convergence tolerance on changes in objective function value.tol_rel_obj (
float|None) – Convergence tolerance on relative changes in objective function value.tol_grad (
float|None) – Convergence tolerance on the norm of the gradient.tol_rel_grad (
float|None) – Convergence tolerance on the relative norm of the gradient.tol_param (
float|None) – Convergence tolerance on changes in parameter value.history_size (
int|None) – History size for the L-BFGS Hessian approximation. Values of 5–10 are usually sufficient; must be less than the parameter-space dimensionality.
- classmethod from_dict(d)#
Create fit options from a dictionary.
Known dataclass fields are extracted and used for instantiation. Remaining keys are stored in
extra_kwargsfor CmdStanPy.
- to_dict()#
Convert options to a CmdStanPy kwargs dictionary.
Nonevalues are removed so CmdStanPy can apply its own defaults.