pymc-labs / pymc-marketing

Bayesian marketing toolbox in PyMC. Media Mix (MMM), customer lifetime value (CLV), buy-till-you-die (BTYD) models and more.
https://www.pymc-marketing.io/
Apache License 2.0
683 stars 190 forks source link

CLV models don't have working repr without model fit #559

Closed wd60622 closed 7 months ago

wd60622 commented 7 months ago

Noticing that the __repr__ method for the base CLV model relies on the model attribute. https://github.com/pymc-labs/pymc-marketing/blob/612b4d4357d4ba1f645e042fee9edc24d7f1a490/pymc_marketing/clv/models/basic.py#L33

However, this throws an AttributeError if it hasn't been fit or the model hasn't been built

Thought on this, @ColtAllen ?

ColtAllen commented 7 months ago

This is an open issue - https://github.com/pymc-labs/pymc-marketing/issues/318 - and relevant to https://github.com/pymc-labs/pymc-marketing/issues/409.

@ricardoV94 and I are working on https://github.com/pymc-labs/pymc-marketing/pull/545, and changes are being made to build_model which may close the above issues. I'll know more once the PR is ready for review.