pymc-marketing
pymc-marketing copied to clipboard
Raise Exception when `GammaGammaModel` does not converge properly
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.