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

How are LTV distributions calculated? #3

Open
JohanWork opened this issue May 31, 2022 · 1 comment
Open

How are LTV distributions calculated? #3

JohanWork opened this issue May 31, 2022 · 1 comment

Comments

@JohanWork
Copy link

Thank you for making the code for the loss function, metrics and example notebooks open source.

From the last paragraph in section 3:

Another key advantage of the ZILN loss is that it provides a full prediction distribution. We obtain not only the probability of returning but also the value distribution of LTV for returning customers. In addition to mean LTV prediction, the uncertainty of LTV predictions can be assessed using quantiles of a lognormal distribution as in general quantile regression.

To me it is unclear both from checking the code examples and the paper, how the LTV prediction distributions are calculated, can you get them both for a singel predictions and a group of prediction for example?

Thank you!

@jarandaf
Copy link

Hi @JohanWork, AFAIK the library simply returns the mean of a LogNormal distribution. Check this method:

def zero_inflated_lognormal_pred(logits: tf.Tensor) -> tf.Tensor:

Since loc and scale (parameters of the LogNormal distribution) are returned by the DNN, one can also get not only the mean but any desired quantile. Check this for more details.

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

No branches or pull requests

2 participants