Coder Social home page Coder Social logo

PyData talk about lifetimes HOT 9 OPEN

camdavidsonpilon avatar camdavidsonpilon commented on June 3, 2024 10
PyData talk

from lifetimes.

Comments (9)

rphaneendra avatar rphaneendra commented on June 3, 2024 8

It's here.

from lifetimes.

benjcabalona1029 avatar benjcabalona1029 commented on June 3, 2024 2

Does anyone have a local copy of the notebook?

from lifetimes.

CamDavidsonPilon avatar CamDavidsonPilon commented on June 3, 2024 1

@ReaBx, no, you are mostly right, it is a confusing concept and I get confused sometimes as well. In lifetimes, the definition is:

customers['recency'] = (customers['max'] - customers['min'])

In words:

recency represents the age of the customer when they made their most recent purchases. This is equal to the duration between a customer’s first purchase and their latest purchase.


In the linked notebook, the author uses the definition:

recency: time of most recent purchase

That's too ambiguous of a definition. But ultimately the author uses lifetimes utils to calculate it, so their summary statistics are the same.


I get further confused by the doc's explanation of the recency/frequency graph where they seem to be using the other definition ("Your coldest customers are those that are in the top-right corner: they bought a lot quickly, and we haven’t seen them in weeks.")

Fair - this graphic does cause a lot of confusion. In generating this graphic, we need to set a max time, which in this case is ~40 time periods. Another way to see this is "all customers first bought from me 40 weeks ago". Thus if a customer has a recency of 5, it means they bought at time 0 and 5 and never since. Thus they are likely dead (or "cold").

from lifetimes.

alexlewzey avatar alexlewzey commented on June 3, 2024 1

This has been taken down, does anyone have a copy of the notebook?

from lifetimes.

stochastic1 avatar stochastic1 commented on June 3, 2024

Just curious if anyone has tried this approach. We're actually talking about future steps and wonder if it's worth the investment in time to learn and build out this approach on our cluster.

from lifetimes.

depy avatar depy commented on June 3, 2024

Good stuff. I was trying to find pymc3 implementation without success. :)

from lifetimes.

ReaBx avatar ReaBx commented on June 3, 2024

Just skimming over this and I'm really confused about the different definitions of recency. I asked in their github as well but maybe you have an idea on this here, too since this seems ambiguous in the lifetimes docs as well.

In the linked notebook, they define

  • recency: time of most recent purchase

However, they use lifetimes.utils.summary_data_from_transaction_data() for the RFM data prep and I find

  • in the code
    customers['recency'] = (customers['max'] - customers['min'])
  • in the docs:
    recency represents the age of the customer when they made their most recent purchases. This is equal to the duration between a customer’s first purchase and their latest purchase.

I get further confused by the doc's explanation of the recency/frequency graph where they seem to be using the other definition ("Your coldest customers are those that are in the top-right corner: they bought a lot quickly, and we haven’t seen them in weeks.")

Maybe someone can shed some light on these two definitions? Am I missing something obvious?

from lifetimes.

shovan007 avatar shovan007 commented on June 3, 2024

Even after installing 'pymc3' using pip install pymc3, which showed me that it was successfully installed.

After running the program using Jupyter notebook, python 3.6, I am getting an error.

ModuleNotFoundError: No module named 'pymc3'

image

from lifetimes.

gourxb avatar gourxb commented on June 3, 2024

@CamDavidsonPilon , I was going though the paper[1] by Fader 2004, which states RFM as

“RFM” characteristics: recency (time of most recent purchase), frequency (number of past
purchases), and monetary value (average purchase amount per transaction).

Where you code as pointed out by @ReaBx takes

Recency(recency represents the age of the customer when they made their most recent purchases) and Frequency as (repeat purchases)

customers['frequency'] = customers['count'] - 1
customers['recency'] = (customers['max'] - customers['min']) / freq_multiplier

I am confused as to how this difference in the two recency and frequency defination will affect the CLV modelling?

[1] Fader, Peter S., Bruce GS Hardie, and Ka Lok Lee. "RFM and CLV: Using iso-value curves for customer base analysis." Journal of marketing research 42.4 (2005): 415-430.(http://brucehardie.com/papers/rfm_clv_2005-02-16.pdf)

from lifetimes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.