From 329125d4110312d6001e9486e1cb3490a90565c4 Mon Sep 17 00:00:00 2001 From: Bernard Kleynhans <31479649+bkleyn@users.noreply.github.com> Date: Fri, 18 Mar 2022 12:44:38 -0400 Subject: [PATCH] Vectorized Predict for Non-contextual Policies and Scaler Refactor (#53-54) --- CHANGELOG.txt | 8 ++ docs/.buildinfo | 2 +- docs/_static/documentation_options.js | 2 +- docs/about.html | 2 +- docs/api.html | 119 +++++++++---------- docs/contributing.html | 2 +- docs/examples.html | 2 +- docs/genindex.html | 32 +++--- docs/index.html | 2 +- docs/installation.html | 2 +- docs/new_bandit.html | 2 +- docs/objects.inv | Bin 1389 -> 1389 bytes docs/py-modindex.html | 2 +- docs/quick.html | 2 +- docs/search.html | 2 +- docs/searchindex.js | 2 +- mabwiser/_version.py | 2 +- mabwiser/base_mab.py | 15 +-- mabwiser/clusters.py | 4 +- mabwiser/greedy.py | 32 ++++-- mabwiser/linear.py | 41 ++++--- mabwiser/mab.py | 109 ++++++++---------- mabwiser/neighbors.py | 4 +- mabwiser/popularity.py | 25 ++-- mabwiser/rand.py | 33 ++++-- mabwiser/softmax.py | 23 +++- mabwiser/thompson.py | 33 ++++-- mabwiser/treebandit.py | 4 +- mabwiser/ucb.py | 20 +++- mabwiser/utils.py | 39 ++++--- tests/test_base.py | 2 +- tests/test_greedy.py | 21 ++++ tests/test_invalid.py | 8 +- tests/test_lingreedy.py | 159 +++++++++++++++++++++++++- tests/test_lints.py | 95 ++++++++------- tests/test_linucb.py | 27 +++-- tests/test_mab.py | 12 +- tests/test_popularity.py | 21 ++++ tests/test_random.py | 25 +++- tests/test_ridge.py | 4 +- tests/test_softmax.py | 21 ++++ tests/test_thompson.py | 21 ++++ tests/test_ucb.py | 21 ++++ 43 files changed, 672 insertions(+), 332 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f6e13a1..fbe2404 100755 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,14 @@ MABWiser CHANGELOG ===================== +March, 17, 2022 2.4.0 +------------------------------------------------------------------------------- +major: +- Implement vectorized functions for non-contextual policies to speed-up prediction for multiple decisions. +- Change MAB predict and predict_expectations to allow empty contexts to be specified for non-contextual policies. +- Update scaler use in Linear policies so that standard scaler can be fit directly instead of pre-trained scalers. +- Change scaler argument from pre-trained `arm_to_scaler` input to a boolean scale flag. + March, 8, 2022 2.3.0 ------------------------------------------------------------------------------- major: diff --git a/docs/.buildinfo b/docs/.buildinfo index b73da4e..d9e4d7f 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: be8d7ae06467e3a22a202d69cb2b24ab +config: 3d55ee819e2d2bd60e727943c52c4b22 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js index 32053ba..2e89cf7 100644 --- a/docs/_static/documentation_options.js +++ b/docs/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '2.3.0', + VERSION: '2.4.0', LANGUAGE: 'None', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/about.html b/docs/about.html index 0a44bdf..7de1105 100644 --- a/docs/about.html +++ b/docs/about.html @@ -4,7 +4,7 @@ - About Multi-Armed Bandits — MABWiser 2.3.0 documentation + About Multi-Armed Bandits — MABWiser 2.4.0 documentation