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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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