Public repo containing code for simulations, bandit algorithms, wrapper algorithms for paper "Power Constrained Bandits"
This repo is based on the following academic publication:
- Paper PDF: https://arxiv.org/abs/2004.06230
-
- Provided environments for simulations including SCB, ASCB, HeartSteps
-
- Provided meta-algorithms we developed including probability clipping, data dropping and action flipping
-
- Provided utility functions to calculate test statistics, reward, regret etc
-
- Main scripts to run simulations
python>=3.5, numpy, argparse, scipy
For a quick test for the set up of the code, run sh main.sh
It may take ~20min to run 1,000 simulations
The main script to run power analyses simulations on SCB environment with ACTS algorithm and probability-clipping meta-algorithm
python run_exp.py --S 1000 `# number of total simulations`\
--env scb `# environments (options: scb, ascb, mobile, nonlinear)`\
--alg acts `# algorithms (options: fix_pi, acts, bose, linucb)`\
--wrapper clip `# wrapper algorithms (options: none, clip, drop, flip)`\
--experiment power `# experiment type (options: power,type_i_error)`
python run_exp.py --S 1000 `# number of total simulations`\
--env scb `# environments (options: scb, ascb, mobile, nonlinear)`\
--alg acts `# algorithms (options: fix_pi, acts, bose, linucb)`\
--wrapper clip `# wrapper algorithms (options: none, clip, drop, flip)`\
--experiment power `# experiment type (options: power,type_i_error)`\
--effect_size large `# estimated treatment_effect size (options: none, small, large)`
python run_exp.py --S 1000 `# number of total simulations`\
--env scb `# environments (options: scb, ascb, mobile, nonlinear)`\
--alg acts `# algorithms (options: fix_pi, acts, bose, linucb)`\
--wrapper clip `# wrapper algorithms (options: none, clip, drop, flip)`\
--experiment power `# experiment type (options: power,type_i_error)`\
--noise_size large `# estimated noise size (options: none, small, large)`
python run_exp.py --S 1000 `# number of total simulations`\
--env scb `# environments (options: scb, ascb, mobile, nonlinear)`\
--alg acts `# algorithms (options: fix_pi, acts, bose, linucb)`\
--wrapper clip `# wrapper algorithms (options: none, clip, drop, flip)`\
--experiment power `# experiment type (options: power,type_i_error)`\
--approx `# approximate marginal reward model with B_nt=1`
python run_exp.py --S 1000 `# number of total simulations`\
--env scb `# environments (options: scb, ascb, mobile, nonlinear)`\
--alg acts `# algorithms (options: fix_pi, acts, bose, linucb)`\
--wrapper clip `# wrapper algorithms (options: none, clip, drop, flip)`\
--experiment power `# experiment type (options: power,type_i_error)`\
--drop `# drop_last_dimension`
python run_exp.py --S 1000 `# number of total simulations`\
--env nonlinear `# approximate ASCB with a linear function`\
--alg acts `# algorithms (options: fix_pi, acts, bose, linucb)`\
--wrapper clip `# wrapper algorithms (options: none, clip, drop, flip)`\
--experiment power `# experiment type (options: power,type_i_error)`\