Skip to content

big-ucl/rumboost

Repository files navigation


GitHub Repo Size Python Versions PyPI Version PyPI Downloads Documentation Status License: MIT arXiv

Description

RUMBoost is a python package to estimate Random Utility models with Gradient Boosted Decision Trees. More specifically, each parameter in the traditional utility function is replaced by an ensemble of regression trees with appropriate constraints to: i) ensure the guarantee of marginal utilities monotonicity; ii) incorporate alternative-specific attributes; and iii) provide an intrinsically interpretable non-linear form of the utility function, directly learnt from the data.

Currently RUMBoost can estimate the following RUMs:

  • MNL
  • Nested Logit
  • Cross-Nested Logit
  • An equivalent of the Mixed Effect model

For more details, you can refer to our paper.

Installation

To use the latest version of RUMBoost, we recommend cloning this repository and installing the requirements in a separate environment.

An oldest version of RUMBoost is also available on pypi. All the resources (examples, docs and requirements) related to this version are in the commit associated with the release. You can install RUMBoost from PyPI with the following command:

pip install rumboost

We recommend to install rumboost in a separate environment with its dependencies.

Documentation and examples

The full documentation can be found here. In addition, you can find several examples on how to use RUMBoost under the example folder. Currently, there are seven example notebooks. We recommend using them in this order:

  1. simple_rumboost: how to train and plot parameters of a simple RUMBoost model
  2. feature_interaction: how to include feature interactions for training and plotting
  3. shared_ensembles: how to train a RUMBoost model with one or more ensembles shared across alternatives
  4. functional_effect: how to train and plot a functional effect RUMBoost model
  5. nested: how to train a nested logit RUMBoost model
  6. cross-nested: how to train a cross-nested logit RUMBoost model
  7. smoothing_and_vot: how to smooth a RUMBoost output and plot the smoothed version, as well as computing and plotting VoT
  8. bootstrap: how to test the model robustness
  9. GPU_and_batch_training: how to train the model with batches and how to compute the gradients on the GPU

Bug reports and feature requests

If you encounter any issues or have ideas for new features, please open an issue. You can also contact us at nicolas.salvade.22@ucl.ac.uk

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you found this repository useful, you can acknowledge the authors by citing:

  • Salvadé, N., & Hillel, T. (2025). Rumboost: Gradient Boosted Random Utility Models. Transportation Research Part C: Emerging Technologies 170, 104897. DOI: 10.1016/j.trc.2024.104897

About

Gradient Boosted Random Utility Models

Resources

License

Stars

19 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors

Languages