Skip to content
/ rlfit Public

Package for fitting reinforcement learning model to behavior data under multi-armed bandits

License

Notifications You must be signed in to change notification settings

nrgrp/rlfit

Repository files navigation

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 which was used for the numerical experiments in the paper.

Installation

Using pip

You can install the package via PyPI:

pip install rlfit

Development setup

We manage dependencies through uv. Once you have installed uv you can perform the following commands to set up a development environment:

  1. Clone the repository:

    git clone https://github.com/nrgrp/rlfit.git
    cd rlfit
  2. Create a virtual environment and install dependencies:

    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 and the corresponding paper for some basic usages. If a development environment is configured, executing

make jupyter

will install and start the jupyter lab.

About

Package for fitting reinforcement learning model to behavior data under multi-armed bandits

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published