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_configReturn a class default configuration dictionary.
default_sampler_configReturn a class default sampler configuration dictionary.
fit_resultGet the posterior fit_result.
idGenerate a unique hash value for the model.
posteriorposterior_predictivepredictionspriorprior_predictiveversionidatasampler_configmodel_config