Giter VIP home page Giter VIP logo

Comments (4)

amit-sharma avatar amit-sharma commented on August 26, 2024

If I understand correctly, you are asking how the naive effect formula is derived.

The naive formula is simply the observational estimate: if the question is what is the effect of recommendations on clicks-through to a page P, we can simply count all the visits to page P that came through recommendations (is_rec_visit) and then divide by the total number of visits to that page P.

More details: To derive the formula, note that the naive effect corresponds to P(Click|Recommendation=True). This can be approximated by simply estimating the fraction: when Recommendation is True (recommendations are shown), count the number of events where a page was accessed via a recommendation, and when it was accessed directly.

Total number of visits to a page (T): length(is_rec_visit) or [length of any other column grouped by the page]
Accessed via a recommendation (Clicked on recommendation) (C): sum(is_rec_visit==1)
Accessed directly (D): length(is_rec_visit) - sum(is_rec_visit==1)

Hence, P(Clicked on recommendation| Recommendation=True) = C/T

Hope this helps @luoruisichuan

from causal-inference-tutorial.

luoruisichuan avatar luoruisichuan commented on August 26, 2024

thanks for your help very much!
if I assume that "Accessed directly (D)" is constant, may I use following formula to estimate the naive effect?
P(Clicked on recommendation| Recommendation=True) = C/D=C/(T-C)

thanks for your help very much!

from causal-inference-tutorial.

amit-sharma avatar amit-sharma commented on August 26, 2024

That may not work, since it is not necessary that accessed directly (D) is always higher than C. For some new products, it is possible that C>D and the probability will >1.

But I see what you are saying. An alternative way is to compute the fraction of shown recommendations that got clicked. So if you have the number of times a recommendation was shown (S), you can compute naive effect as C/S where C is the number of clicks on those recommendations.

from causal-inference-tutorial.

luoruisichuan avatar luoruisichuan commented on August 26, 2024

thanks for your help very much.

from causal-inference-tutorial.

Related Issues (9)

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.