All Projects → google → Lifetime_value

google / Lifetime_value

Licence: apache-2.0

Projects that are alternatives of or similar to Lifetime value

Nd101
记录自己深度学习之路的点滴
Stars: ✭ 80 (-1.23%)
Mutual labels:  jupyter-notebook
Fcn.tensorflow
Tensorflow implementation of Fully Convolutional Networks for Semantic Segmentation (http://fcn.berkeleyvision.org)
Stars: ✭ 1,230 (+1418.52%)
Mutual labels:  jupyter-notebook
Wellnessconversation Languagemodel
Korean Language Model을 이용한 심리상담 대화 언어 모델.
Stars: ✭ 80 (-1.23%)
Mutual labels:  jupyter-notebook
Odscon Sf 2015
Material for ODSCON San Francisco 2015
Stars: ✭ 80 (-1.23%)
Mutual labels:  jupyter-notebook
Hands On Algorithmic Problem Solving
A middle-to-high level algorithm book designed with coding interview at heart!
Stars: ✭ 1,227 (+1414.81%)
Mutual labels:  jupyter-notebook
Talks odt
Slides and materials for most of my talks by year
Stars: ✭ 80 (-1.23%)
Mutual labels:  jupyter-notebook
Tensorflow object detector
Tensorflow Object Detector
Stars: ✭ 80 (-1.23%)
Mutual labels:  jupyter-notebook
Object Detection On Thermal Images
Robust Object Classification of Occluded Objects in Forward Looking Infrared (FLIR) Cameras
Stars: ✭ 81 (+0%)
Mutual labels:  jupyter-notebook
Attention Transfer
Improving Convolutional Networks via Attention Transfer (ICLR 2017)
Stars: ✭ 1,231 (+1419.75%)
Mutual labels:  jupyter-notebook
Style Semantics
Code for the paper "Controlling Style and Semantics in Weakly-Supervised Image Generation", ECCV 2020
Stars: ✭ 81 (+0%)
Mutual labels:  jupyter-notebook
Captcha Decoder
Stars: ✭ 80 (-1.23%)
Mutual labels:  jupyter-notebook
Machine Learning
Code & Data for Introduction to Machine Learning with Scikit-Learn
Stars: ✭ 80 (-1.23%)
Mutual labels:  jupyter-notebook
D3 Js Step By Step
http://zeroviscosity.com/category/d3-js-step-by-step
Stars: ✭ 80 (-1.23%)
Mutual labels:  jupyter-notebook
Keras Segnet Basic
SegNet-Basic with Keras
Stars: ✭ 80 (-1.23%)
Mutual labels:  jupyter-notebook
Fnn
Embed strange attractors using a regularizer for autoencoders
Stars: ✭ 81 (+0%)
Mutual labels:  jupyter-notebook
Quickstart Python
Stars: ✭ 80 (-1.23%)
Mutual labels:  jupyter-notebook
Mimic Code
MIMIC Code Repository: Code shared by the research community for the MIMIC-III database
Stars: ✭ 1,225 (+1412.35%)
Mutual labels:  jupyter-notebook
Kgtk
Knowledge Graph Toolkit
Stars: ✭ 81 (+0%)
Mutual labels:  jupyter-notebook
Dl in nlp deeppavlov cs224n spring2020
"Deep Learning in Natural Language Processing" - a course by DeepPavlov built on top of Stanford's cs224n
Stars: ✭ 81 (+0%)
Mutual labels:  jupyter-notebook
Tutorials2021
Mediterranean Machine Learning school tutorials
Stars: ✭ 81 (+0%)
Mutual labels:  jupyter-notebook

Lifetime Value

Accurate predictions of customers’ lifetime value (LTV) given their attributes and past purchase behavior enables a more customer-centric marketing strategy. One challenge of LTV modeling is that some customers never come back, and the distribution of LTV can be heavy-tailed. The commonly used mean squared error (MSE) loss does not accommodate the significant fraction of zero value LTV from one-time purchasers and can be sensitive to extreme large LTV from top spenders.

We model the distribution of LTV given associated features as a mixture of zero point mass and lognormal distribution, which we refer to as zero-inflated lognormal (ZILN) distribution. This modeling approach enables us to capture the churn probability and account for heavy-tailedness nature of LTV at the same time, and also allows for easy uncertainty quantification of the point prediction. The proposed loss function can be used in both linear models and deep neural networks (DNN). We also advocate normalized Gini coefficients to quantify model discrimination and promote decile charts to assess model calibration.

The proposed loss function (implemented in Keras) and evaluation metrics are integrated into a python package. And we demonstrate the predictive performance of our proposed model in notebooks on two real-world public datasets.

Paper

Wang, Xiaojing, Liu, Tianqi, and Miao, Jingang. (2019). A Deep Probabilistic Model for Customer Lifetime Value Prediction. arXiv:1912.07753.

Installation

The easiest way is propably using pip:

pip install -q git+https://github.com/google/lifetime_value

If you are using a machine without admin rights, you can do:

pip install -q git+https://github.com/google/lifetime_value --user

If you are using Google Colab, just add "!" to the beginning:

!pip install -q git+https://github.com/google/lifetime_value

Package works for python 3 only.

Usage

Package can be imported as

import lifetime_value as ltv

notebooks

The best way to learn how to use the package is probably by following one of the notebooks, and the recommended way of opening them is Google Colab.

Kaggle Acquire Valued Shoppers Challenge Dataset

This Kaggle challenge provides almost 350 million rows of completely anonymised transactional data from over 300,000 shoppers. We use the transactional data to demonstrate LTV modeling.

We download the transaction.csv (21GB) file from Kaggle server and prepare csv files for each of top 20 most common companies. Then we train a Keras model to predict customer's lifetime value and returning probability.

The raw data is available here.

  • Data preparation downloads kaggle data transaction.csv and preprocesses the top 20 most common companies' data to customer-level one. This is optional, and running this will save time for regression and classification because the data are cached.
  • Regression trains a Keras regression linear/dnn model with specified loss function and evaluates the results.
  • Classification trains a Keras classification linear/dnn model with specified loss function and evaluates the results.

KDD Cup 98

The Second International Knowledge Discovery and Data Mining Tools Competition (a.k.a., the KDD Cup 1998) provides a dataset collected by Paralyzed Veterans of America (PVA), a non-profit organization that provides programs and services for US veterans with spinal cord injuries or disease. The organization raised money via direct mailing campaigns and was interested in lapsed donors: people who have stopped donating for at least 12 months. The provided dataset contains around 200K such donors who received the 1997 mailing and did not make a donation in the previous 12 months. We tackle the same task of the competition, which is to predict the donation dollar value to the 1997 mailing campaign.

The raw data is available here.

  • Regression trains regression models and makes comparisons on different methods.

People

Package is created and maintained by Xiaojing Wang, Tianqi Liu, and Jingang Miao.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].