statsmodels.tsa.exponential_smoothing.ets.ETSModel.fit#

ETSModel.fit(start_params=None, maxiter=1000, full_output=True, disp=True, callback=None, return_params=False, **kwargs)[source]#

Fit an ETS model by maximizing log-likelihood

Log-likelihood is a function of the model parameters \(\alpha, \beta, \gamma, \phi\) (depending on the chosen model), and, if initialization_method was set to ‘estimated’ in the constructor, also the initial states \(l_{-1}, b_{-1}, s_{-1}, \ldots, s_{-m}\).

The fit is performed using the L-BFGS algorithm.

Parameters:
start_paramsarray_like, optional

Initial values for parameters that will be optimized. If this is None, default values will be used. The length of this depends on the chosen model. This should contain the parameters in the following order, skipping parameters that do not exist in the chosen model.

  • smoothing_level (\(\alpha\))

  • smoothing_trend (\(\beta\))

  • smoothing_seasonal (\(\gamma\))

  • damping_trend (\(\phi\))

If initialization_method was set to 'estimated' (the default), additionally, the parameters

  • initial_level (\(l_{-1}\))

  • initial_trend (\(b_{-1}\))

  • initial_seasonal.0 (\(s_{-1}\))

  • …

  • initial_seasonal.<m-1> (\(s_{-m}\))

also have to be specified. The initial seasonal states are normalized to sum to 0 (additive seasonality) or to m (multiplicative seasonality) during the fit, so that the last one, \(s_{-m}\), is computed from the others in every evaluation of the log-likelihood. Its start value is then ignored, and the fit starts from the value that makes the initial seasonals add up to 0 or m. If initial_seasonal.<m-1> is bounded, all m initial seasonals are free parameters, and its start value, moved into the bounds, is the starting point. If it is fixed, for example with fix_params, the fixed value is used and the start value is ignored.

maxiterint, optional

The maximum number of iterations to perform.

full_outputbool, optional

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.

dispbool, optional

Set to True to print convergence messages.

callbackcallable, optional

Called after each iteration, as callback(xk), where xk is the current parameter vector.

return_paramsbool, optional

Whether or not to return only the array of maximizing parameters. Default is False.

**kwargs

Additional keyword arguments to pass to the optimizer.

Returns:
resultsETSResults

The fitted model results.