Xlogit: An Open-Source Python Package for Gpu-Accelerated Estimation of Mixed Logit Models

Document Type

Article

Publication Date

3-1-2022

Publication Title

Journal of Choice Modelling

Volume

42

Abstract

Mixed Logit is an advanced and flexible tool for the study of discrete choice problems. However, this flexibility involves computationally intensive calculations, as the estimation of Mixed Logit models requires the simulation of integrals. In addition, the specification of Mixed Logit models requires decisions such as potential explanatory variables to be included in the model as well as their mixing distributions. This specification process involves testing and estimation of different combinations of variables and mixing distributions, which is time consuming and computationally intensive. In response, this paper introduces xlogit, an open-source Python package that leverages the performance of graphic processing units (GPU) for an efficient estimation of Mixed Logit models. For benchmarking, the performance of xlogit was compared against the PyLogit and Biogeme Python packages as well as the mlogit, Apollo, gmnl, and mixl R packages. Artificially generated as well as actual data were used to evaluate the performance gains provided by xlogit. Results suggest that using a mid-range graphics card and a regular desktop computer, xlogit is in average 55x faster than Apollo, 43x faster than Biogeme, 74x faster than gmnl, 39x faster than mixl, 16x faster than mlogit, and 27x faster than PyLogit, with an additional advantage of efficient memory management. The performance gains provided by xlogit facilitate an efficient modeling process, as it enables the testing of a large number of model specifications more efficiently relative to existing software packages. xlogit's open source code, documentation, and usage examples are publicly available in the package's GitHub repository.

Keywords

Discrete choice; Econometrics; GPU acceleration; Mixed logit; Python

Disciplines

Models and Methods | Statistical Models

UNLV article access

Search your library

Share

COinS