Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce BetaGeoNBD Random Variable (#1317)
* Add BGNBD distribution and BGNBD Random Variable * Add BGNBD excel test * Remove logp in terms of Potential * Rename BGNBD -> BetaGeoNBD * Add logp and test matching lifetimes * Add logp param.type.ndim > 1. Add logp pt.switch. Related tests * Add test_bg_nbd_sample_prior * Add _distribution_new_customers and related test. Rename population_dropout|purchase_rate as dropout|purchase_rate to consolidate naming among models * Adjust test_model_repr expected result to BetaGeoNBD instead of BGNBD * Improve distribution_new_customer, distribution_new_customer_purchase_rate. Introduce distribution_new_customer_recency_frequency. Improve tests * Revert @pytest.mark.slow to in test_model_convergence * Revert distribution changes related to #1269 * Revert more changes related to #1269 * Revert BetaGeoBetaBinomRV changes * Revert ParetoNBDRV changes * Docstring cleanup * Revert changes in ContContract dist * Clean ContContract changes * Revert deletion _supp_shape_from_params * Remove commented chunk on fit_result. Opted for data to standardize with other CLV models * BetaGeoNBDRV as pre-#1269 definition * Fix test_numerically_stable_logp * Overrride ModifiedBetaGeoModel.distribution_new_customer method * Modify test_bg_nbd tensor parametrization to only vectors in test_bg_nbd. Passing param.type.ndim > 1 now raises NotImplementedError * Silence mypy in 2 lines * Adapt BetaGeoNBDRV to #1269 * Fix test_clv_fit_mcmc * Modify sim_data to reflect the beta-distributed dropout process * Add reference to BetaGeoNBD * Delete _logp * Delete commented weights param in test_bg_nbd * Ammend BetaGeoNBD docstring * Fix BetaGeoNBD math * Fix test_posterior_distributions to include dropout distributions * Fix #NUM! docstring * Tweak sim_data * Add co-author. Co-authored-by: Colt Allen <[email protected]> --------- Co-authored-by: Colt Allen <[email protected]>
- Loading branch information