Code Monkey home page Code Monkey logo

Comments (4)

hugy718 avatar hugy718 commented on July 23, 2024

Found the bug. It is due to incorrect dealing with time window, when birth time is determined in getUserBirthTime in the ExtendedCohortSelection class. maxDate of this class is the max date in dataset. The date range for locating birth event in the original code needs to fall in the date of the user's first record and the max date - window size. This creates a problem for tail users that have their records very close to the max date. So their ranges to find birth event are empty ranges. Now I set the range to look for birth event for one user to be from the date of its first record to the date of its last record. It can output all the users.

from cool.

KimballCai avatar KimballCai commented on July 23, 2024

I agree with the reason that causes this issue, but I do not agree to change the code because it is not the problem of the core logic. Instead, we need to add introductions about how to utilize the time window attribute.

from cool.

KimballCai avatar KimballCai commented on July 23, 2024

If we want to use the time window, it means that we only want to select users who have records for at least x days where x is defined in the time window.

from cool.

KimballCai avatar KimballCai commented on July 23, 2024

But we also need to consider the users whose last record date is earlier than the max data in the data but do not have records for continuous x days.

from cool.

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.