Skip to content

Commit

Permalink
Fix ModifiedBetaGeoNBDRV sim_data (#1472)
Browse files Browse the repository at this point in the history
* Fix ModifiedBetaGeoNBDRV sim_data

* pre-commit.ci run

* pre-commit.ci run
  • Loading branch information
PabloRoque authored Feb 6, 2025
1 parent 4ef55f3 commit 15793e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pymc_marketing/clv/distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,9 @@ def sim_data(lam, p, T):
t = 0 # recency
n = 0 # frequency

churn = p # MBG/NBD customer active with probability p at time 0
churn = (
rng.random() < p
) # MBG/NBD customer active with probability p at time 0
wait = rng.exponential(scale=1 / lam)

while t + wait < T and not churn:
Expand Down

0 comments on commit 15793e2

Please sign in to comment.