# Deep Contextual MAB
MAB and linear/non-linear Contextual MAB algorithms.
## Algorithms
#### Multi-Arm Bandits
* [x] Epsilon Greedy
* [x] UCB
* [x] Thompson Sampling
#### Contextual Multi-Arm Bandits
* [x] Neural Net Epsilon Greedy
* [x] LinUCB
* [x] Neural Net UCB
## Usage Instructions
* This project is published on [PyPI](https://pypi.org/project/deep-mab/). 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](https://contextual-bandits.readthedocs.io/en/latest/).
* 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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/samsonq/contextual-bandits",
"name": "deep-mab",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "mab deep_mab deep_mab reinforcement-learning",
"author": "Samson Qian",
"author_email": "samsonqian@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/f5/6b/708399003a99f38f65c2d4bc26abd3c40a184f57faa3fe65e2f18ed33b6c/deep_mab-0.1.1.tar.gz",
"platform": null,
"description": "# Deep Contextual MAB\nMAB and linear/non-linear Contextual MAB algorithms.\n\n## Algorithms\n\n#### Multi-Arm Bandits\n* [x] Epsilon Greedy\n* [x] UCB\n* [x] Thompson Sampling\n\n#### Contextual Multi-Arm Bandits\n* [x] Neural Net Epsilon Greedy\n* [x] LinUCB\n* [x] Neural Net UCB\n\n## Usage Instructions\n* This project is published on [PyPI](https://pypi.org/project/deep-mab/). To install package, run:\n\n ```\n pip install deep-mab\n ```\n* To run the algorithms, import the package and call the respective functions. For example, to run the LinUCB algorithm, run:\n\n ```\n from deep_mab.cmab import LinUCB\n model = LinUCB(n_arms=10, alpha=1, fit_intercept=True)\n model.fit(X_train, y_train)\n model.predict(X_test)\n ```\n* For more details, refer to the [documentation](https://contextual-bandits.readthedocs.io/en/latest/).\n* To run the examples, clone the repository and run the following commands:\n\n ```\n cd deep-mab\n pip install -r requirements.txt\n python examples/linucb_example.py\n ```\n* To run the tests, run the following commands:\n\n ```\n cd deep-mab\n pip install -r requirements.txt\n pytest\n ```\n \n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Contextual MAB algorithms",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/samsonq/contextual-bandits"
},
"split_keywords": [
"mab",
"deep_mab",
"deep_mab",
"reinforcement-learning"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ed0d45d4994f78ab4e09ac023d4df65821e95f238d086a0b0e425e96694ea03f",
"md5": "6835bbb5e11e7e552abc86ee20446774",
"sha256": "cea6eeb0c06672999255d9d58809a3d5b1552fd6a6d125e20efbfa5a384cb78c"
},
"downloads": -1,
"filename": "deep_mab-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6835bbb5e11e7e552abc86ee20446774",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 8713,
"upload_time": "2023-07-31T02:36:16",
"upload_time_iso_8601": "2023-07-31T02:36:16.712658Z",
"url": "https://files.pythonhosted.org/packages/ed/0d/45d4994f78ab4e09ac023d4df65821e95f238d086a0b0e425e96694ea03f/deep_mab-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f56b708399003a99f38f65c2d4bc26abd3c40a184f57faa3fe65e2f18ed33b6c",
"md5": "d7561194e8c309d258d59808f396502c",
"sha256": "5a039438889be9c04171bc908cbbcf16301dc32584d6dfdd329c69cdcf21ba08"
},
"downloads": -1,
"filename": "deep_mab-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "d7561194e8c309d258d59808f396502c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 6243,
"upload_time": "2023-07-31T02:36:18",
"upload_time_iso_8601": "2023-07-31T02:36:18.283181Z",
"url": "https://files.pythonhosted.org/packages/f5/6b/708399003a99f38f65c2d4bc26abd3c40a184f57faa3fe65e2f18ed33b6c/deep_mab-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-31 02:36:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "samsonq",
"github_project": "contextual-bandits",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "deep-mab"
}