ModelIO#

class pymc_marketing.model_builder.ModelIO[source]#

Mixin to handle saving and loading of models.

Methods

ModelIO.__init__(*args, **kwargs)

ModelIO.attrs_to_init_kwargs(attrs)

Convert the model configuration and sampler configuration from the attributes to keyword arguments.

ModelIO.build_from_idata(idata)

Build the model from the InferenceData object.

ModelIO.create_idata_attrs()

Create attributes for the inference data.

ModelIO.idata_to_init_kwargs(idata)

Create the model configuration and sampler configuration from the InferenceData to keyword arguments.

ModelIO.load(fname[, check])

Create a ModelBuilder instance from a file.

ModelIO.load_from_idata(idata[, check])

Create a ModelBuilder instance from an InferenceData object.

ModelIO.save(fname, **kwargs)

Save the model's inference data to a file.

ModelIO.set_idata_attrs([idata])

Set attributes on an InferenceData object.

Attributes

id

Generate a unique hash value for the model.

version

idata

sampler_config

model_config