Skip to content

Commit

Permalink
Minor update propensity demo twang demo
Browse files Browse the repository at this point in the history
  • Loading branch information
robinvanemden committed Jul 25, 2020
1 parent a2ffe17 commit 0fc453a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo/demo_simpsons_paradox_propensity.R
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ print(paste("Movie:",round(sum(prop_dt[choice==2]$reward)/nrow(prop_dt[choice==2
# ------------------------------------------------------------------------------------------------------------
# ---------------------------------- Biased policy repaired with estimated prop ---------------------------
# ------------------------------------------------------------------------------------------------------------

#
# if(!require(twang)) install.packages("twang")
#
# b_dt$choice <- b_dt$choice - 1
Expand All @@ -215,7 +215,7 @@ print(paste("Movie:",round(sum(prop_dt[choice==2]$reward)/nrow(prop_dt[choice==2
# b_dt$choice <- b_dt$choice + 1
#
# weights <- get.weights(ip, stop.method = "es.mean")
# b_dt$p <- weights
# b_dt$p <- 1 / weights
#
# f <- formula("reward ~ choice | X.1 + X.2 | p")
#
Expand All @@ -234,5 +234,5 @@ print(paste("Movie:",round(sum(prop_dt[choice==2]$reward)/nrow(prop_dt[choice==2
#
# print(paste("Sport:",sum(prop_dt[choice==1]$reward)/nrow(prop_dt[choice==1]))) # 0.6 CTR Sport again, yay!
# print(paste("Movie:",sum(prop_dt[choice==2]$reward)/nrow(prop_dt[choice==2]))) # 0.5 CTR Movie again, yay!

#

0 comments on commit 0fc453a

Please sign in to comment.