BetaGeoFitter: RuntimeWarning: overflow encountered in double_scalars
See original GitHub issueRunning this
from lifetimes.plotting import plot_frequency_recency_matrix
_, ax = plt.subplots(1, 1, figsize=(10, 8))
plot_frequency_recency_matrix(bgf);
on a bgf
with parameters
lifetimes.BetaGeoFitter: fitted with 2556392 subjects, a: 0.40, alpha: 50.16, b: 0.81, r: 0.10
results in
beta_geo_fitter.py:205: RuntimeWarning: overflow encountered in double_scalars
denominator = 1 + (x > 0) * (a / (b + x - 1)) * ((alpha + T) / (alpha + recency)) ** (r + x)
The plot still shows up though.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13
Top Results From Across the Web
python - What are the causes of overflow encountered in ...
Overflow error implies that an operation yields a value out of the range defined for the corresponding data type.
Read more >Python: Overflow Encountered In Double-Scalars - ADocLib
Error: RuntimeWarning: overflow encountered in longscalars # Solution: # This error usually comes up because the data type you're using can't # ...
Read more >CLV Kaggle.pdf - BI Open
BetaGeoFitter : fitted with 234385 subjects, a: 1.04, alpha: 45.52, b: 12.48, r: 0.99> ... RuntimeWarning: overflow encountered in double_scalars.
Read more >runtimewarning: invalid value encountered in double_scalars
This tutorial explains how to fix the following error in Python: runtimewarning: invalid value encountered in double_scalars.
Read more >Customer Life Time Value Prediction - Kaggle
BG/NBD Model bgf = BetaGeoFitter(penalizer_coef=0.001) ... RuntimeWarning: overflow encountered in double_scalars denominator = 1 + (x > 0) * (a / (b +...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For now, re-sampling is the only option for me. Read here also Overcoming the BG/NBD Model’s #NUM! Error Problem
@zerualem: I am getting this error again and again please help out I have try the above things still getting the error
C:\Users\shubham.kumar\AppData\Local\Continuum\anaconda3\lib\site-packages\autograd\numpy\numpy_vjps.py:75: RuntimeWarning: invalid value encountered in multiply defvjp(anp.exp, lambda ans, x : lambda g: ans * g) C:\Users\shubham.kumar\AppData\Local\Continuum\anaconda3\lib\site-packages\autograd\numpy\numpy_vjps.py:75: RuntimeWarning: invalid value encountered in multiply defvjp(anp.exp, lambda ans, x : lambda g: ans * g) C:\Users\shubham.kumar\AppData\Local\Continuum\anaconda3\lib\site-packages\autograd\numpy\numpy_vjps.py:75: RuntimeWarning: invalid value encountered in multiply defvjp(anp.exp, lambda ans, x : lambda g: ans * g) C:\Users\shubham.kumar\AppData\Local\Continuum\anaconda3\lib\site-packages\autograd\numpy\numpy_vjps.py:75: RuntimeWarning: invalid value encountered in multiply defvjp(anp.exp, lambda ans, x : lambda g: ans * g) C:\Users\shubham.kumar\AppData\Local\Continuum\anaconda3\lib\site-packages\autograd\numpy\numpy_vjps.py:75: RuntimeWarning: invalid value encountered in multiply defvjp(anp.exp, lambda ans, x : lambda g: ans * g) C:\Users\shubham.kumar\AppData\Local\Continuum\anaconda3\lib\site-packages\autograd\tracer.py:48: RuntimeWarning: divide by zero encountered in log return f_raw(*args, **kwargs) C:\Users\shubham.kumar\AppData\Local\Continuum\anaconda3\lib\site-packages\autograd\tracer.py:48: RuntimeWarning: invalid value encountered in add return f_raw(*args, **kwargs) C:\Users\shubham.kumar\AppData\Local\Continuum\anaconda3\lib\site-packages\autograd\numpy\numpy_vjps.py:75: RuntimeWarning: invalid value encountered in multiply defvjp(anp.exp, lambda ans, x : lambda g: ans * g) C:\Users\shubham.kumar\AppData\Local\Continuum\anaconda3\lib\site-packages\autograd\numpy\numpy_vjps.py:78: RuntimeWarning: divide by zero encountered in double_scalars defvjp(anp.log, lambda ans, x : lambda g: g / x) C:\Users\shubham.kumar\AppData\Local\Continuum\anaconda3\lib\site-packages\autograd\tracer.py:48: RuntimeWarning: divide by zero encountered in log return f_raw(*args, **kwargs) C:\Users\shubham.kumar\AppData\Local\Continuum\anaconda3\lib\site-packages\autograd\tracer.py:48: RuntimeWarning: overflow encountered in power return f_raw(*args, **kwargs)