Skip to main content

Contextual MAB algorithms

Project description

Deep Contextual MAB

MAB and linear/non-linear Contextual MAB algorithms.

Algorithms

Multi-Arm Bandits

  • Epsilon Greedy
  • UCB
  • Thompson Sampling

Contextual Multi-Arm Bandits

  • Neural Net Epsilon Greedy
  • LinUCB
  • Neural Net UCB

Usage Instructions

  • This project is published on PyPI. To install package, run:

    pip install deep-mab
    
  • To run the algorithms, import the package and call the respective functions. For example, to run the LinUCB algorithm, run:

    from deep_mab.cmab import LinUCB
    model = LinUCB(n_arms=10, alpha=1, fit_intercept=True)
    model.fit(X_train, y_train)
    model.predict(X_test)
    
  • For more details, refer to the documentation.

  • To run the examples, clone the repository and run the following commands:

    cd deep-mab
    pip install -r requirements.txt
    python examples/linucb_example.py
    
  • To run the tests, run the following commands:

    cd deep-mab
    pip install -r requirements.txt
    pytest
    

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

deep_mab-0.1.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

deep_mab-0.1.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file deep_mab-0.1.1.tar.gz.

File metadata

  • Download URL: deep_mab-0.1.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for deep_mab-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5a039438889be9c04171bc908cbbcf16301dc32584d6dfdd329c69cdcf21ba08
MD5 d7561194e8c309d258d59808f396502c
BLAKE2b-256 f56b708399003a99f38f65c2d4bc26abd3c40a184f57faa3fe65e2f18ed33b6c

See more details on using hashes here.

File details

Details for the file deep_mab-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: deep_mab-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for deep_mab-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cea6eeb0c06672999255d9d58809a3d5b1552fd6a6d125e20efbfa5a384cb78c
MD5 6835bbb5e11e7e552abc86ee20446774
BLAKE2b-256 ed0d45d4994f78ab4e09ac023d4df65821e95f238d086a0b0e425e96694ea03f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page