pymc-marketing icon indicating copy to clipboard operation
pymc-marketing copied to clipboard

Raise Exception when `GammaGammaModel` does not converge properly

Open ColtAllen opened this issue 3 months ago • 1 comments

If a fitted GammaGammaModel has a q parameter less than 1, all predicted spend values will be negative. This usually happens when the model is fit to heavy-tailed monetary value arrays with values in the millions.

We should add a check for this raising the following exception:

ValueError: Model did not converge properly. Scale monetary_value array by maximum value and refit model.

ColtAllen avatar Mar 18 '24 21:03 ColtAllen