-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add experimental support for the BG/BB model
Beta-Geometric/Beta-Bernoulli model is a special variant of the beta-binomial model without the binomial coefficient. It is particularly efficient for discrete-time analyses. It is considered "experimental" as the associated "Fitter" in the lifetimes python package is buggy (see CamDavidsonPilon/lifetimes#259). An override is provided in lifetimes_ext which utilizes exponentials and natural logarithms to reduce the observed convergence instability. See custom_beta_geo_beta_binom_fitter.py for details. BG/BB literature: https://brucehardie.com/papers/020/fader_et_al_mksc_10.pdf Change-Id: Icc2701b42bc720635e5d96c9c809c48c0f93e945 GitOrigin-RevId: 9765a1b45087a8b0c05b7eb6070b32d64a81b017
- Loading branch information
1 parent
dd89587
commit f14cc0b
Showing
13 changed files
with
191 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
marketing-analytics/predicting/future-customer-value-segments/bigquery_mod/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
marketing-analytics/predicting/future-customer-value-segments/fcvs_pipeline_csv.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
marketing-analytics/predicting/future-customer-value-segments/generate_templates.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
marketing-analytics/predicting/future-customer-value-segments/lifetimes_ext/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2021 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""Simplify importing of extensions.""" | ||
from .custom_beta_geo_beta_binom_fitter import BetaGeoBetaBinomFitter | ||
|
||
__all__ = ( | ||
"BetaGeoBetaBinomFitter", | ||
) |
Oops, something went wrong.