A package for after-study analysis of adaptive experiments in which data is pooled across users.
Project description
_ _ __ _ _ _
| (_)/ _| (_) | | | |
| |_| |_ ___ _ __ _ ___| | _____| |_
| | | _/ _ \ |/ _` |/ __| |/ / _ \ __|
| | | || __/ | (_| | (__| < __/ |_
|_|_|_| \___| |\__,_|\___|_|\_\___|\__|
_/ |
|__/
Save your standard errors from pooling in adaptive experiments.
Setup (if not using conda)
Create and activate a virtual environment
python3 -m venv .venv; source /.venv/bin/activate
Adding a package
- Add to
requirements.txtwith a specific version or no version if you want the latest stable - Run
pip freeze > requirements.txtto lock the versions of your package and all its subpackages
Running the code
- `export PYTHONPATH to the absolute path of this repository on your computer
./run_local_synthetic.sh, which outputs tosimulated_data/by default. See all the possible flags to be toggled in the script code.
Linting/Formatting
Testing
python -m pytest python -m pytest tests/unit_tests python -m pytest tests/integration_tests
Talk about gitignored cluster simulation scripts
Important Large-Scale Simulations
No adaptivity
sbatch --array=[0-999] -t 0-5:00 --mem=50G run_and_analysis_parallel_synthetic --T=10 --n=50000 --recruit_n=50000 --steepness=0.0 --alg_state_feats=intercept,past_reward --action_centering_RL=0 --inference_loss_func_filename="functions_to_pass_to_analysis/get_least_squares_loss_inference_no_action_centering.py" --theta_calculation_func_filename="functions_to_pass_to_analysis/estimate_theta_least_squares_no_action_centering.py"
No adaptivity, 5 batches incremental recruitment
sbatch --array=[0-999] -t 0-5:00 --mem=50G run_and_analysis_parallel_synthetic --T=10 --n=50000 --recruit_n=10000 --steepness=0.0 --alg_state_feats=intercept,past_reward --action_centering_RL=0 --inference_loss_func_filename="functions_to_pass_to_analysis/get_least_squares_loss_inference_no_action_centering.py" --theta_calculation_func_filename="functions_to_pass_to_analysis/estimate_theta_least_squares_no_action_centering.py"
Some adaptivity, no action_centering
sbatch --array=[0-999] -t 0-5:00 --mem=50G run_and_analysis_parallel_synthetic --T=10 --n=50000 --recruit_n=50000 --steepness=3.0 --alg_state_feats=intercept,past_reward --action_centering_RL=0 --inference_loss_func_filename="functions_to_pass_to_analysis/get_least_squares_loss_inference_no_action_centering.py" --theta_calculation_func_filename="functions_to_pass_to_analysis/estimate_theta_least_squares_no_action_centering.py"
Some adaptivity, no action_centering, 5 batches incremental recruitment
sbatch --array=[0-999] -t 0-5:00 --mem=50G run_and_analysis_parallel_synthetic --T=10 --n=50000 --recruit_n=10000 --steepness=3.0 --alg_state_feats=intercept,past_reward --action_centering_RL=0 --inference_loss_func_filename="functions_to_pass_to_analysis/get_least_squares_loss_inference_no_action_centering.py" --theta_calculation_func_filename="functions_to_pass_to_analysis/estimate_theta_least_squares_no_action_centering.py"
More adaptivity, no action_centering
sbatch --array=[0-999] -t 0-5:00 --mem=50G run_and_analysis_parallel_synthetic --T=10 --n=50000 --recruit_n=50000 --steepness=5.0 --alg_state_feats=intercept,past_reward --action_centering_RL=0 --inference_loss_func_filename="functions_to_pass_to_analysis/get_least_squares_loss_inference_no_action_centering.py" --theta_calculation_func_filename="functions_to_pass_to_analysis/estimate_theta_least_squares_no_action_centering.py"
Even more adaptivity, no action_centering
sbatch --array=[0-999] -t 0-5:00 --mem=50G run_and_analysis_parallel_synthetic --T=10 --n=50000 --recruit_n=50000 --steepness=10.0 --alg_state_feats=intercept,past_reward --action_centering_RL=0 --inference_loss_func_filename="functions_to_pass_to_analysis/get_least_squares_loss_inference_no_action_centering.py" --theta_calculation_func_filename="functions_to_pass_to_analysis/estimate_theta_least_squares_no_action_centering.py"
Some adaptivity, RL action_centering, no inference action centering
sbatch --array=[0-999] -t 0-5:00 --mem=50G run_and_analysis_parallel_synthetic --T=10 --n=50000 --recruit_n=50000 --steepness=3.0 --alg_state_feats=intercept,past_reward --action_centering_RL=1 --inference_loss_func_filename="functions_to_pass_to_analysis/get_least_squares_loss_inference_no_action_centering.py" --theta_calculation_func_filename="functions_to_pass_to_analysis/estimate_theta_least_squares_no_action_centering.py"
Some adaptivity, inference action_centering, no RL action centering
sbatch --array=[0-999] -t 0-5:00 --mem=50G run_and_analysis_parallel_synthetic --T=10 --n=50000 --recruit_n=50000 --steepness=3.0 --alg_state_feats=intercept,past_reward --action_centering_RL=0 --inference_loss_func_filename="functions_to_pass_to_analysis/get_least_squares_loss_inference_action_centering.py" --theta_calculation_func_filename="functions_to_pass_to_analysis/estimate_theta_least_squares_action_centering.py"
Some adaptivity, inference and RL action_centering
sbatch --array=[0-999] -t 0-5:00 --mem=50G run_and_analysis_parallel_synthetic --T=10 --n=50000 --recruit_n=50000 --steepness=3.0 --alg_state_feats=intercept,past_reward --action_centering_RL=1 --inference_loss_func_filename="functions_to_pass_to_analysis/get_least_squares_loss_inference_action_centering.py" --theta_calculation_func_filename="functions_to_pass_to_analysis/estimate_theta_least_squares_action_centering.py"
Some adaptivity, inference and RL action_centering, even more T
sbatch --array=[0-999] -t 1-00:00 --mem=50G run_and_analysis_parallel_synthetic --T=25 --n=50000 --recruit_n=50000 --steepness=3.0 --alg_state_feats=intercept,past_reward --action_centering_RL=1 --inference_loss_func_filename="functions_to_pass_to_analysis/get_least_squares_loss_inference_no_action_centering.py" --theta_calculation_func_filename="functions_to_pass_to_analysis/estimate_theta_least_squares_no_action_centering.py"
Some adaptivity, inference and RL action_centering, even more T, 5 batches incremental recruitment
sbatch --array=[0-999] -t 1-00:00 --mem=50G run_and_analysis_parallel_synthetic --T=25 --n=50000 --recruit_n=10000 --steepness=3.0 --alg_state_feats=intercept,past_reward --action_centering_RL=1 --inference_loss_func_filename="functions_to_pass_to_analysis/get_least_squares_loss_inference_no_action_centering.py" --theta_calculation_func_filename="functions_to_pass_to_analysis/estimate_theta_least_squares_no_action_centering.py"
TODO
- Add precommit hooks (pip freeze, linting, formatting)
- Run tests on PRs
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lifejacket-0.1.0.tar.gz.
File metadata
- Download URL: lifejacket-0.1.0.tar.gz
- Upload date:
- Size: 63.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9014494753692272de6825c44db9295cad4185abf02f2d8b6cd4ffe89d354e4
|
|
| MD5 |
ed8aeade8d8c4391a035b5b8342a8ba0
|
|
| BLAKE2b-256 |
e2f261b52923ec7f8af15dfddba8a27b84445ce31997e91e37db7413bf4e385a
|
Provenance
The following attestation bundles were made for lifejacket-0.1.0.tar.gz:
Publisher:
publish_to_pypi.yml on StatisticalReinforcementLearningLab/adaptive-sandwich
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lifejacket-0.1.0.tar.gz -
Subject digest:
b9014494753692272de6825c44db9295cad4185abf02f2d8b6cd4ffe89d354e4 - Sigstore transparency entry: 728825124
- Sigstore integration time:
-
Permalink:
StatisticalReinforcementLearningLab/adaptive-sandwich@f0f93169cd82955339c0b8019f4d1e57d7c9763d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/StatisticalReinforcementLearningLab
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@f0f93169cd82955339c0b8019f4d1e57d7c9763d -
Trigger Event:
push
-
Statement type:
File details
Details for the file lifejacket-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lifejacket-0.1.0-py3-none-any.whl
- Upload date:
- Size: 68.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a96b5d2611123b01a3012e53dfc1e45831541c23c4e2657e37087bef29d37a1
|
|
| MD5 |
4723424169989daaa688a6564f78defb
|
|
| BLAKE2b-256 |
783634d9ff709dfccd0a2772fb885154c344aa0ad15e1f994aa08edb2bf55905
|
Provenance
The following attestation bundles were made for lifejacket-0.1.0-py3-none-any.whl:
Publisher:
publish_to_pypi.yml on StatisticalReinforcementLearningLab/adaptive-sandwich
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lifejacket-0.1.0-py3-none-any.whl -
Subject digest:
1a96b5d2611123b01a3012e53dfc1e45831541c23c4e2657e37087bef29d37a1 - Sigstore transparency entry: 728825127
- Sigstore integration time:
-
Permalink:
StatisticalReinforcementLearningLab/adaptive-sandwich@f0f93169cd82955339c0b8019f4d1e57d7c9763d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/StatisticalReinforcementLearningLab
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@f0f93169cd82955339c0b8019f4d1e57d7c9763d -
Trigger Event:
push
-
Statement type: