BaseGammaGammaModel#

class pymc_marketing.clv.models.gamma_gamma.BaseGammaGammaModel(data, *, model_config=None, sampler_config=None)[source]#

Methods

BaseGammaGammaModel.__init__(data, *[, ...])

Initializes model configuration and sampler configuration for the model

BaseGammaGammaModel.build_model(X, y, **kwargs)

Creates an instance of pm.Model based on provided data and model_config, and attaches it to self.

BaseGammaGammaModel.distribution_customer_spend(...)

Posterior distribution of transaction value per customer

BaseGammaGammaModel.distribution_new_customer_spend([...])

Posterior distribution of transaction value for new customers

BaseGammaGammaModel.expected_customer_lifetime_value(...)

Expected customer lifetime value.

BaseGammaGammaModel.expected_customer_spend(...)

Expected transaction value per customer

BaseGammaGammaModel.expected_new_customer_spend()

Expected transaction value for a new customer

BaseGammaGammaModel.fit([fit_method])

Infer model posterior

BaseGammaGammaModel.fit_summary(**kwargs)

BaseGammaGammaModel.get_params([deep])

Get all the model parameters needed to instantiate a copy of the model, not including training data.

BaseGammaGammaModel.load(fname)

Creates a ModelBuilder instance from a file, Loads inference data for the model.

BaseGammaGammaModel.predict(X_pred[, ...])

Uses model to predict on unseen data and return point prediction of all the samples.

BaseGammaGammaModel.predict_posterior(X_pred)

Generate posterior predictive samples on unseen data.

BaseGammaGammaModel.predict_proba(X_pred[, ...])

Alias for predict_posterior, for consistency with scikit-learn probabilistic estimators.

BaseGammaGammaModel.sample_posterior_predictive(X_pred)

Sample from the model's posterior predictive distribution.

BaseGammaGammaModel.sample_prior_predictive(X_pred)

Sample from the model's prior predictive distribution.

BaseGammaGammaModel.save(fname)

Save the model's inference data to a file.

BaseGammaGammaModel.set_idata_attrs([idata])

Set attributes on an InferenceData object.

BaseGammaGammaModel.set_params(**params)

Set all the model parameters needed to instantiate the model, not including training data.

BaseGammaGammaModel.thin_fit_result(keep_every)

Return a copy of the model with a thinned fit result.

Attributes

X

default_model_config

Returns a class default config dict for model builder if no model_config is provided on class initialization Useful for understanding structure of required model_config to allow its customization by users .

default_sampler_config

Returns a class default sampler dict for model builder if no sampler_config is provided on class initialization Useful for understanding structure of required sampler_config to allow its customization by users .

fit_result

id

Generate a unique hash value for the model.

output_var

Returns the name of the output variable of the model.

version

y