# rlfit: Fitting Reinforcement Learning Model to Behavior Data under Bandits
Python package companion to the paper
"Fitting Reinforcement Learning Modelto Behavior Data under Bandits".
This library is collated from the early version code in
[this repository](https://github.com/nrgrp/fit_rl_mab)
which was used for the numerical experiments in the paper.
## Installation
### Using pip
You can install the package via [PyPI](https://pypi.org):
```shell
pip install rlfit
```
### Development setup
We manage dependencies through [uv](https://docs.astral.sh/uv).
Once you have installed uv you can perform the following
commands to set up a development environment:
1. Clone the repository:
```shell
git clone https://github.com/nrgrp/rlfit.git
cd rlfit
```
2. Create a virtual environment and install dependencies:
```shell
make install
```
This will:
- Create a Python 3.12 virtual environment.
- Install all dependencies from pyproject.toml.
## Usage
The core module is the `RLFit` class, which was implemented
following the scikit-learn style.
See the [example notebooks](./examples) and the corresponding
paper for some basic usages.
If a development environment is configured, executing
```shell
make jupyter
```
will install and start the jupyter lab.
Raw data
{
"_id": null,
"home_page": null,
"name": "rlfit",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "convex optimization, model fitting, multi-armed bandits, reinforcement learning",
"author": "Jasper Hoffmann, Baohe Zhang, Joschka Boedecker",
"author_email": "Hao Zhu <zhuh@cs.uni-freiburg.de>",
"download_url": "https://files.pythonhosted.org/packages/d3/b2/71084a78e4bed3900a9334e1b53db94e19f47282ecd3b1b19f671c4272c9/rlfit-0.1.1.tar.gz",
"platform": null,
"description": "# rlfit: Fitting Reinforcement Learning Model to Behavior Data under Bandits\n\nPython package companion to the paper\n\"Fitting Reinforcement Learning Modelto Behavior Data under Bandits\".\nThis library is collated from the early version code in\n[this repository](https://github.com/nrgrp/fit_rl_mab)\nwhich was used for the numerical experiments in the paper.\n\n## Installation\n\n### Using pip\n\nYou can install the package via [PyPI](https://pypi.org):\n\n```shell\npip install rlfit\n```\n\n### Development setup\n\nWe manage dependencies through [uv](https://docs.astral.sh/uv).\nOnce you have installed uv you can perform the following\ncommands to set up a development environment:\n\n1. Clone the repository:\n\n ```shell\n git clone https://github.com/nrgrp/rlfit.git\n cd rlfit\n ```\n\n2. Create a virtual environment and install dependencies:\n\n ```shell\n make install\n ```\n\nThis will:\n\n- Create a Python 3.12 virtual environment.\n- Install all dependencies from pyproject.toml.\n\n## Usage\n\nThe core module is the `RLFit` class, which was implemented\nfollowing the scikit-learn style.\nSee the [example notebooks](./examples) and the corresponding\npaper for some basic usages.\nIf a development environment is configured, executing\n\n```shell\nmake jupyter\n```\n\nwill install and start the jupyter lab.\n",
"bugtrack_url": null,
"license": null,
"summary": "Fitting reinforcement learning model to behavior data under bandits.",
"version": "0.1.1",
"project_urls": {
"repository": "https://github.com/nrgrp/rlfit"
},
"split_keywords": [
"convex optimization",
" model fitting",
" multi-armed bandits",
" reinforcement learning"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "3a48564f4d692e57d2276d93ef91be19b905160ea4ae0834da4989fbfff10c7c",
"md5": "5fb8abb0e975990c1d4934564cc33e28",
"sha256": "ebf3e83a292fd4c85d166a5b3abe38b4f11c8545e0b18484e481ee2849884c2d"
},
"downloads": -1,
"filename": "rlfit-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5fb8abb0e975990c1d4934564cc33e28",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 6008,
"upload_time": "2025-07-18T11:45:07",
"upload_time_iso_8601": "2025-07-18T11:45:07.008286Z",
"url": "https://files.pythonhosted.org/packages/3a/48/564f4d692e57d2276d93ef91be19b905160ea4ae0834da4989fbfff10c7c/rlfit-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d3b271084a78e4bed3900a9334e1b53db94e19f47282ecd3b1b19f671c4272c9",
"md5": "ec20d37372048988a9f43f998b406e12",
"sha256": "e11eaf1fecf5fb6e2248f73fa75fad6cecaee268274582a84012ceb99014a1ed"
},
"downloads": -1,
"filename": "rlfit-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "ec20d37372048988a9f43f998b406e12",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 174095,
"upload_time": "2025-07-18T11:45:08",
"upload_time_iso_8601": "2025-07-18T11:45:08.082931Z",
"url": "https://files.pythonhosted.org/packages/d3/b2/71084a78e4bed3900a9334e1b53db94e19f47282ecd3b1b19f671c4272c9/rlfit-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-18 11:45:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nrgrp",
"github_project": "rlfit",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "rlfit"
}