-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
about how to estimate the intervention effection #3
Comments
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] Hence, P(Clicked on recommendation| Recommendation=True) = C/T Hope this helps @luoruisichuan |
thanks for your help very much! thanks for your help very much! |
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. |
thanks for your help very much. |
for the R code, for the intervention of recommending algorithem, the effect on CTR is as following
naive_observational_estimate <- function(user_visits){
Naive observational estimate
Simply the fraction of visits that resulted in a recommendation click-through.
est =
summarise(user_visits, naive_estimate=sum(is_rec_visit)/length(is_rec_visit))
return(est)
}
in the beforehand code ,the estimate formulas is
"""
sum(is_rec_visit)/length(is_rec_visit)
"""
but how to derivative and get this formuls?
thanks
The text was updated successfully, but these errors were encountered: