Coder Social home page Coder Social logo

Comments (8)

CamDavidsonPilon avatar CamDavidsonPilon commented on June 13, 2024 1

I can confirm I get the same thing, investigating now.

Edit: it seems to be caused by c2bf495#diff-ca060ac937e79ba22cb0a6e9b881675aL43. Unfortunately, I can't recall why I made that change.

from lifetimes.

CamDavidsonPilon avatar CamDavidsonPilon commented on June 13, 2024

Hmm, the algorithm in the background is random - perhaps you got unlucky? Try running it again, and please report back the findings.

from lifetimes.

paoloRais avatar paoloRais commented on June 13, 2024

I re-ran it several times, obtaining the same results.

I know it is unlikely, but can this strange behaviour be related to the fact that I am using Python 3.4 (while your tutorial seems to be in Python 2.7)?

I am also experiencing issues with this part of the tutorial:

from lifetimes.datasets import load_summary_data_with_monetary_value

summary_with_money_value = load_summary_data_with_monetary_value()
summary_with_money_value.head()
returning_customers_summary = summary_with_money_value[summary_with_money_value['frequency'] > 0]

returning_customers_summary.head()

I get an error:

ImportError: cannot import name 'load_summary_data_with_monetary_value'

When I try to import the file cdnow_customers_transactions.csv by hand, the result of returning_customers_summary.head() is:

             frequency  recency      T  monetary_value
customer_id  
1                    2    30.43  38.86           22.35
2                    1     1.71  38.86           11.77
6                    7    29.43  38.86           73.74
7                    1     5.00  38.86           11.77
9                    2    35.71  38.86           25.55

Which is consistent with the content of the file (but not with the tutorial).

from lifetimes.

paoloRais avatar paoloRais commented on June 13, 2024

I installed a separate Python 2.7 environment using Anaconda, and I still obtain the same graph. I wonder what the reason for this can be. I am still testing things and I will keep you updated.

from lifetimes.

CamDavidsonPilon avatar CamDavidsonPilon commented on June 13, 2024

The first issue should be solved in 3eda411

from lifetimes.

CamDavidsonPilon avatar CamDavidsonPilon commented on June 13, 2024

I've upload this bug fix to PyPI too. I image the latest should also have cdnow_customers_transactions.csv - let me know if this is wrong.

from lifetimes.

paoloRais avatar paoloRais commented on June 13, 2024

Thank you!

from lifetimes.

Kristalli avatar Kristalli commented on June 13, 2024

😀

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.