MAB and linear/non-linear Contextual MAB algorithms.
- Epsilon Greedy
- UCB
- Thompson Sampling
- Neural Net Epsilon Greedy
- LinUCB
- Neural Net UCB
-
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