Skip to main content

ChoiceModels

CI

ChoiceModels is a Python library for discrete choice modeling, with utilities for sampling, simulation, and other ancillary tasks. It's part of the Urban Data Science Toolkit (UDST).

Project scope

Status: Active

Mission: ChoiceModels provides reusable tools for specifying, estimating, sampling, and simulating discrete-choice models within larger analytical workflows.

Architecture: ChoiceModels provides portable Python implementations and interfaces for discrete-choice workflows and conventional estimation. Its reference implementations target conventional CPU-based execution, while estimator interfaces allow alternative execution engines to interoperate with the library.

The project maintains and develops:

  • construction and manipulation of choice tables;
  • sampling of alternatives;
  • discrete-choice model specifications and interfaces;
  • conventional model estimation and estimator integrations;
  • Monte Carlo choice simulation;
  • capacity-constrained choice algorithms; and
  • interoperable representations of estimated choice models.

ChoiceModels is designed as a general-purpose discrete-choice library and as an integration layer between model specifications, estimation engines, and simulation workflows.

Development of choice-model methods and estimator integrations is welcome within this mission and architecture. Material changes to the project's mission or execution architecture are considered through UDST's organization-level governance process.

See the UDST Project Directory for organization-wide project status and policy.

Features

The library focuses mainly on tools to help integrate discrete choice models into larger workflows.

ChoiceModels can automate the creation of choice tables for estimation or simulation, using uniform or weighted random sampling of alternatives, as well as interaction terms or cartesian merges.

It also provides general-purpose tools for Monte Carlo simulation of choices given probability distributions from fitted models, with fast algorithms for independent or capacity-constrained choices.

ChoiceModels includes a custom engine for Multinomial Logit estimation that's optimized for fast performance with large numbers of alternatives, as well as a flexible MNL implementation compatible with PyLogit model specifications.

Installation

ChoiceModels requires Python 3.10 or later, and can be installed using the Pip or Conda package managers:

pip install choicemodels
conda install choicemodels --channel conda-forge

Documentation

See the online documentation for much more: https://udst.github.io/choicemodels

Some additional documentation is available within the repo in CHANGELOG.md, CONTRIBUTING.md, /docs/README.md, and /tests/README.md.

There's discussion of current and planned features in the Pull requests and Issues, both open and closed.

Metadata

Release files for choicemodels 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for choicemodels 0.3
File Size Uploaded
choicemodels-0.3.tar.gz 97.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for choicemodels 0.3
File Interpreter ABI Platform
choicemodels-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 132.6 kB

Release files / choicemodels-0.3.tar.gz

Download URL choicemodels-0.3.tar.gz
Size 97.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b89f3c47f1295f243fa9a24f3e6b6075370e25805d9e95d49e281ef6b0c3f6eb
BLAKE2b-256 checksum
How to use checksums
d204f53e29df0dae6e1c58b51974111505473aa2dcd49b55a29680e801e84b91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release files / choicemodels-0.3-py3-none-any.whl

Download URL choicemodels-0.3-py3-none-any.whl
Size 35.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e53f8d6429730097d78dba13444f49026386c0f286e8fa5657e4f3446400dfb9
BLAKE2b-256 checksum
How to use checksums
222de5a96bd7e674fff1920e7dcd8ea114763d265b54d06cb456031795540b8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page