statsmodels.base.distributed_estimation.DistributedModel.fit#

DistributedModel.fit(data_generator, fit_kwds=None, parallel_method='sequential', parallel_backend=None, init_kwds_generator=None)[source]#

Performs the distributed estimation using the corresponding DistributedModel

Parameters:
data_generatorgenerator

A generator that produces a sequence of tuples where the first element in the tuple corresponds to an endog array and the element corresponds to an exog array.

fit_kwdsdict-like, optional

Keywords needed for the model fitting.

parallel_method{“sequential”, “joblib”}, optional

Type of distributed estimation to be used, currently “sequential” and “joblib” are supported.

parallel_backendNone or joblib parallel_backend object, optional

used to allow support for more complicated backends, ex: dask.distributed

init_kwds_generatorgenerator or None, optional

Additional keyword generator that produces model init_kwds that may vary based on data partition. The current usecase is for WLS and GLS

Returns:
Results

An instance of results_class (RegularizedResults by default), initialized using the dummy result model and the join_method result as params.