ModelFitter#
- class pymc_marketing.model_builder.ModelFitter[source]#
Mixin providing a unified fitting API for all PyMC-Marketing models.
Owns the whole fit pipeline: model preparation, sampler dispatch, deterministic recomputation,
idatamerging, and thefit_datagroup. Subclasses customize behaviour through the hooks below rather than by reimplementingfit().Examples
class MyModel(ModelBuilder): ... model = MyModel() idata = model.fit(data, method="mcmc")
Methods
ModelFitter.__init__(*args, **kwargs)Build the
fit_datagroup stored alongside the posterior.ModelFitter.fit([data, method, progressbar, ...])Infer the model posterior.
Perform transformation on the model after sampling.
Attributes
modelidatasampler_configis_fitted_