Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample_prior_predictive for CLV models #1155

Open
wd60622 opened this issue Nov 3, 2024 · 2 comments
Open

sample_prior_predictive for CLV models #1155

wd60622 opened this issue Nov 3, 2024 · 2 comments
Labels

Comments

@wd60622
Copy link
Contributor

wd60622 commented Nov 3, 2024

Is this a workflow that you use @ColtAllen?

This gets inherited from the ModelBuilder (and shows in the docs) but isn't actually implemented, right?

import pandas as pd
from pymc_marketing import clv

data_url = "https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/data/clv_quickstart.csv"
data = pd.read_csv(data_url)
data["customer_id"] = data.index

beta_geo_model = clv.BetaGeoModel(data=data)
try:
    beta_geo_model.sample_prior_predictive()  
except TypeError:
    ...
@wd60622 wd60622 added the CLV label Nov 3, 2024
@ColtAllen
Copy link
Collaborator

ColtAllen commented Nov 3, 2024

I'm actually working on a PR right now that involves plotting prior predictives. This can't be done with the ModelBuilder methods due to the X-Y convention, so I've been using the following approach:

with clv_model.model:
    prior_idata = pymc.sample_prior_predictive()

@wd60622
Copy link
Contributor Author

wd60622 commented Nov 3, 2024

Yup, understand that limitation. I plan to rework that in the near future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants