BaseModelBuilder#
- class pymc_marketing.model_builder.BaseModelBuilder(model_config=None, sampler_config=None)[source]#
Base class for building models with PyMC Marketing.
It provides an easy-to-use API (similar to scikit-learn) for models and help with deployment.
Methods
BaseModelBuilder.__init__
([model_config, ...])Initialize model configuration and sampler configuration for the model.
Convert the model configuration and sampler configuration from the attributes to keyword arguments.
Build the model from the InferenceData object.
Create attributes for the inference data.
BaseModelBuilder.graphviz
(**kwargs)Get the graphviz representation of the model.
Convert the model configuration and sampler configuration from the InferenceData to keyword arguments.
BaseModelBuilder.load
(fname[, check])Create a ModelBuilder instance from a file.
BaseModelBuilder.load_from_idata
(idata[, check])Create a ModelBuilder instance from an InferenceData object.
BaseModelBuilder.save
(fname, **kwargs)Save the model's inference data to a file.
BaseModelBuilder.set_idata_attrs
([idata])Set attributes on an InferenceData object.
Attributes
default_model_config
Return a class default configuration dictionary.
default_sampler_config
Return a class default sampler configuration dictionary.
fit_result
Get the posterior fit_result.
id
Generate a unique hash value for the model.
posterior
posterior_predictive
predictions
prior
prior_predictive
version
idata
sampler_config
model_config