Biogeme is a open source Python package designed for the maximum likelihood estimation of parametric models in general, with a special emphasis on discrete choice models. It relies on the package Python Data Analysis Library called Pandas.
Biogeme used to be a stand alone software package, written in C++. All the material related to the previous versions of Biogeme are available on the old webpage.
BIOGEME is distributed free of charge. We ask each user
- to register to Biogeme's users group, and
- to mention explicitly the use of the package when publishing results, using the following reference:
Note that versions 3.2.7 and 3.2.8 are almost identical. The description below compares to version 3.2.6.
- Assisted specification
- The asssisted specification algorithm by Ortelli et al. (2021) is now available. The multi-objective Variable Neighborhood Search algorithm is available separately, and can be used in any context.
- Optimization
- The optimization algorithms have been organized into
two modules. The
module
algorithms.py
contains generic optimization algorithms. The moduleoptimization.py
contains the functions that can be called directly by Biogeme [Click here for the documentation of theestimate
function]. [Click here for an example.] - CFSQP
- The CFSQP algorithm has been removed from the distribution.
- Null log likelihood
- The log likelihood is calculated. The null model predicts equal probability for each alternative.
- Saved iterations
- Iterations are saved in a file with
extension
.iter
. If the file exists, Biogeme will initialize the parameters from this files, and ignore the starting values provided. To turn this feature off, setbiogeme.saveIterations=False
- Random starting values
- It is possible to modify the initial values of the parameters in all formulas, using randomly generated values. The value is drawn from a uniform distribution on the interval defined by the bounds (by default [-100, 100].) [Click here for the documentation].
- Sensitivity analysis
- The betas for sensitivity analysis are now generated by bootstrapping. [Click here for the documentation].
- Box-Cox
- The implementation of the Box-Cox transform was incorrect and has been corrected.
- Validation
- The out-of-sample validation has been
improved. [Click
here for the documentation]. It
has to be compined with the
split
function of the database object. [Click here for an example] - Statistics about chosen alternatives
- It is now possible to calculate the number of time each alternative is chosen and available in the sample. [Click here for the documentation].
- Validity check for the nests
- The validity of the specification of the nests for nested and cross nested logit models is now checked.
- ALOGIT file
- Output files in F12 format compatible with ALOGIT can now be produced. [Click here for the documentation].
- Likelihood ratio test
- A function to perform the likelihood ratio test has been implemented. [Click here for the documentation].
Several versions of Biogeme have been developed over the years. Several names of animals appear: Gnu, Bison, Python, and now, Pandas.
- Version -1: HieLoW
-
Around 1990, Michel Bierlaire wrote a software package called HieLoW: Hierarchical Logit for Windows. It was written in Borland C++, and was the first discrete choice estimation software with a graphical user interface. It was designed for the estimation of logit and nested logit models. The user had to specify the models through a graphical user interface. This software was distributed by Stratec SA, Brussels.
- Version 1: BisonBiogeme
Around 2000, the first version of Biogeme was released. Written in GNU C++, it was the first open source discrete choice software. It was designed to estimate the parameters of a list of predetermined discrete choice models such as logit, binary probit, nested logit, cross-nested logit, multivariate extreme value models, discrete and continuous mixtures of multivariate extreme value models, models with nonlinear utility functions, models designed for panel data, and heteroscedastic models. The modeling language was designed to be simple, and was developed using a a general-purpose parser generator called GNU Bison. Later, it will be referred to as BisonBiogeme. The distributions can be found here.
- Version 2: PythonBiogeme
Around 2010, a more flexible version was designed for general purpose parametric models. The modeling language was extended, and based on the Python language. A series of discrete choice models were precoded for an easy use. Also written in GNU C++, the distributions can be found here.
- Version 3: PandasBiogeme
In 2018, a completely new version of the software was released. It was not anymore a standalone executable, but a Python package. The package is written in Python, with the exception of the core calculations of the models, that are written in C++ for the sake of efficiency. The motivation was to combine the simplicity of the usage (especially for teaching purposes), with the sophistication provided by Python (for research and applications purposes). Morever, the management of the data relies on the package Pandas, which has become the workhorse of data scientists. Therefore, the name PandasBiogeme has been adopted. It is distributed on the Python Package Index repository.
I would like to thank the following persons who played various roles in the development of Biogeme along the years. The list is certainly not complete, and I apologize for those who are omitted: Alexandre Alahi, Nicolas Antille, Gianluca Antonini, Kay Axhausen, John Bates, Denis Bolduc, David Bunch, Andrew Daly, Anna Fernandez Antolin, Mamy Fetiarison, Mogens Fosgerau, Emma Frejinger, Carmine Gioia, Marie-Hélène Godbout, Stephane Hess, Tim Hillel, Richard Hurni, Eva Kazagli, Jasper Knockaert, Xinjun Lai, Gael Lederrey, Virginie Lurkin, Nicholas Molyneaux, Carolina Osorio, Meritxell Pacheco Paneque, Thomas Robin, Pascal Scheiben, Matteo Sorci, Ewout ter Hoeven, Michael Thémans, Joan Walker.
I would like to express a special thank to Moshe Ben-Akiva and Daniel McFadden for their friendship, and for the immense influence that they had and still have on my work.
Biogeme has been developed by Michel Bierlaire, Ecole Polytechnique Fédérale de Lausanne, Switzerland.