Skip to content

feature: slate ope estimators #88

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

Merged
merged 10 commits into from
May 17, 2021

Conversation

fullflu
Copy link
Contributor

@fullflu fullflu commented Apr 10, 2021

  • Implement Slate OPE estimators (SIPS, IIPS, and RIPS)
  • Add input validation
  • Code Test of Slate OPE
  • Performance Test of Slate OPE
  • Add Comment
  • Add meta_slate.py
  • Test meta_slate.py
  • Add example of Slate OPE
% pytest -s tests/ope/test_ipw_estimators_slate.py
=========================================================== test session starts ============================================================
platform darwin -- Python 3.9.1, pytest-6.2.1, py-1.10.0, pluggy-0.13.1
rootdir: /Users/kt/projects/zr-obp
collected 61 items                                                                                                                         

[sample_action_and_obtain_pscore]: 100%|████████████████████████████████████████████████████████████████| 1000/1000 [00:37<00:00, 26.67it/s]
[sample_action_and_obtain_pscore]: 100%|██████████████████████████████████████████████████████████████| 1000/1000 [00:00<00:00, 6504.97it/s]
Cascade additive
gt_mean: 1.858, 3 * gt_std / sqrt(n): 0.08164060992661183
estimated_value: 1.821030610225593 ------ estimator: sips, 
estimated_value: 1.91435928121275 ------ estimator: iips, 
estimated_value: 1.8354943639350463 ------ estimator: rips, 
[sample_action_and_obtain_pscore]: 100%|████████████████████████████████████████████████████████████████| 1000/1000 [00:38<00:00, 25.95it/s]
[sample_action_and_obtain_pscore]: 100%|██████████████████████████████████████████████████████████████| 1000/1000 [00:00<00:00, 6537.97it/s]
Independent
gt_mean: 1.89, 3 * gt_std / sqrt(n): 0.08467744841615311
estimated_value: 1.8635144688428213 ------ estimator: sips, 
estimated_value: 1.9260419198232916 ------ estimator: iips, 
estimated_value: 1.8520557384244258 ------ estimator: rips, 
[sample_action_and_obtain_pscore]: 100%|████████████████████████████████████████████████████████████████| 1000/1000 [00:38<00:00, 25.90it/s]
[sample_action_and_obtain_pscore]: 100%|██████████████████████████████████████████████████████████████| 1000/1000 [00:00<00:00, 6498.48it/s]
Standard additive
gt_mean: 1.825, 3 * gt_std / sqrt(n): 0.0965333812403445
estimated_value: 1.8013433082242036 ------ estimator: sips, 
estimated_value: 1.8968268102209969 ------ estimator: iips, 
estimated_value: 1.8084251396365023 ------ estimator: rips, 
.

====================================================== 61 passed in 118.21s (0:01:58) ======================================================

@fullflu fullflu changed the title [WIP] feature: slate ope estimators feature: slate ope estimators Apr 18, 2021
@usaito
Copy link
Contributor

usaito commented May 3, 2021

@fullflu

Thanks! Can you address the following points?

general

obp/utils.py (checks)

[must]

[imo]

  • the three check functions for sips, rips, and iips share many lines (such as checks for position, reward, and some others). I think it is better to create an additional function to put these repetitive lines together.

[nits]

obp/ope/estimators_slate.py

[nits]

examples/quickstart/README.md

  • add the following line
- [`synthetic_slate.ipynb`](./synthetic_slate.ipynb): a quickstart guide to implement off-policy evaluation (OPE) and the evaluation of OPE procedures for the slate recommendation setting with the Open Bandit Pipeline.

ope/meta_slate.py

@usaito usaito merged commit 3781edc into st-tech:master May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants