Questions tagged [lifetimes-python]

'lifetimes' helps to measure customer lifetime value in Python

Tag should be used only for the questions regarding calculation of CLTV.

As emphasized by P. Fader and B. Hardie, understanding and acting on customer lifetime value (CLV) is the most important part of business’s sales efforts. And Lifetimes is a Python library to calculate CLV for you.

Link for official documentation: http://lifetimes.readthedocs.io/en/latest/

18 questions
4
votes
2 answers

Python error "AttributeError: module 'scipy.misc' has no attribute 'logsumexp' "

I'm trying to use the lifetimes header to create the Recency, Frequency and T from a given data but it keeps showing the following error AttributeError: module 'scipy.misc' has no attribute 'logsumexp' from lifetimes.plotting import * from…
Shantanu
  • 43
  • 1
  • 4
2
votes
1 answer

ValueError: Some values in recency vector are larger than T vector. using Liftimes Package

Below table is an example of my dataframe. I am using the lifetimes package Organization id Lifetime_orders DOY(most recent date by day) Tenure 54302 22 69 43 32453 4 72 44 This is the code Im using to run the bgModel within the…
2
votes
1 answer

Pydata Seattle - Implementing and Training Predictive Customer Lifetime Value Models in Python

Can someone point me to the PyData Seattle notebook for Implementing and Training Predictive Customer Lifetime Value Models in Python? It seems oracle bought datascience.com and now the notebook isn't available on the provided Github link anymore.
2
votes
1 answer

calibration_and_holdout_data: AttributeError: 'int' object has no attribute 'n'

I'm trying to run a BG/NBD model using the lifetimes libary. All my analysis are based on the following example, yet with my own data: https://towardsdatascience.com/whats-a-customer-worth-8daf183f8a4f Somehow I receive the following error and after…
superdell
  • 21
  • 2
1
vote
0 answers

Unable to run lifetimes.GammaGammaFitter model

I am doing customer value prediction using lifetimes package. I am unable to run the lifetimes.GammaGammaFitter model. It is showing Unexpected exception formatting exception. Falling back to standard exception when running it. The dataframe looks…
venkat
  • 13
  • 2
1
vote
0 answers

Python Lifetimes Package - lifetimes.utils.summary_data_from_transaction_data returns error "AttributeError: 'DataFrame' object has no attribute 'ix"

I am trying to transform the following dataset This dataset contains about a million rows of customer transaction data. Columns are broken down as follows: Date - the date of the transaction Card Number - the unique identifier for each client ( can…
1
vote
1 answer

lifetimes library - ISSUE of calculating CLV when using function: customer_lifetime_value of GammaGammaFitter

I'm trying to calculate CLV(Customer Life Value) using lifetimes python library so, I am fitting purchase behavior data on ParetoNBDFitter and fitting purchase price data on GammaGammaFitter. and When I'm trying to calculate CLV based on…
오진석
  • 21
  • 2
1
vote
2 answers

Lifetimes package gives inconsistent results

I am using Lifetimes to compute CLV of some customers of mine. I have transactional data and, by means of summary_data_from_transaction_data (the implementation can be found here) I would like to compute the recency, the frequency and the time…
Cowflu
  • 332
  • 2
  • 12
1
vote
2 answers

Unable to import estimation module in lifetimes

I'm trying to analyze customer shopping data and I'm trying this using lifetimes package in Python.I'm unable to import estimation module in lifetime from lifetimes.utils import * from lifetimes.plotting import * from lifetimes.estimation import…
Bvs Revanth
  • 49
  • 1
  • 7
1
vote
1 answer

How to get the expected value of customer lifetime using lifetimes package in Python

The python package lifetimes is using BG/NBD method which is the same as the R package BTYD. In the R paper, we could estimate the customer lifetime (CLV) package on any newly acquired customer given a specified time range. However, I am not able to…
Pythoner
  • 11
  • 1
  • 3
1
vote
1 answer

Syntax for PALIVE in Python like pnbd.PAlive in R?

Can anyone help me to calculate PALIVE(the probability that they are still alive at the end of the calibration period.) in Python? I know R has a Pareto negative binomial distribution function pnbd.PAlive(params, r, s, apha, beta) but what is…
pybeginner
  • 11
  • 1
0
votes
0 answers

Getting Overflow error from lifetimes package

Below is a sample of the dataset I am using as well as the bgmodel The summary table was created from utilizing the below code from lifetimes import BetaGeoFitter from lifetimes.plotting import plot_period_transactions,…
0
votes
0 answers

How to estimate customer lifetime value in daily increments using BG/Gamma Gamma Models (spend model) in Python?

I am calculating customer lifetime value and this estimation is performed in monthly increments. I would like to calculate CLV in increments of 7 days, 14 days etc.. using the model parameters (see below), do i convert days into month, for i.e., 7…
0
votes
0 answers

ConvergenceError: The model did not converge. Try adding a larger penalizer to see if that helps convergence

I tried the following code from the lifetimes library, using a 1 million row dataset. I get the error "ConvergenceError: The model did not converge. Try adding a larger penalizer to see if that helps convergence." I havent set any penalizer. …
0
votes
1 answer

Iterate a function over individual rows until condition is met, then move on to the next row

I am working with the lifetimes library to build a customer lifetime value model. The library comes with a method called conditional_expected_number_of_purchases_up_to_time that allows you to predict purchases for each customer in your data set over…
1
2