Skip to main content

Experimental designs for discrete choice models.

Project description

ChoiceDesign

Tests Documentation

ChoiceDesign is a Python package tool to construct efficient designs for Discrete Choice Experiments. ChoiceDesign combines enough flexibility to construct from simple 2-alternative designs with few attributes, to more complex settings that may involve conditions between attributes. ChoiceDesign is a revamped version of EDT, a project I created some years ago for the same purpose. ChoiceDesign includes improvements over EDT such as class-based syntax, coding improvements, better documentation and making this package available to install via pip.

Installation

ChoiceDesign is available to install via the regular syntax of pip:

  • python3 -m pip install choicedesign

Features

The main features of ChoiceDesign are:

  • D-efficient, A-efficient, and C-efficient designs — minimise D-error (determinant), A-error (average variance), or C-error (WTP variance sum)
  • Db-efficient (Bayesian) designs via Parameter(prior_std=...) and bayes_draws argument
  • Three optimisation algorithms — random swapping, RSC (Relabelling, Swapping, Cycling), and Modified Federov
  • Customisable utility functions (no external dependencies — expressions rewritten from scratch)
  • Designs with conditions over different attribute levels
  • Designs with blocks
  • Full-factorial designs
  • Multiple stopping criteria (fixed number of iterations, iterations without improvement, or fixed time)

Documentation

Full documentation, including a getting started guide, concepts, and example notebooks, is available at choicedesign.readthedocs.io.

Examples

Jupyter notebooks illustrating different design scenarios are available in the examples/ folder of this repo and rendered in the documentation.

How to contribute?

Any contributions to ChoiceDesign are welcome via this Git, or to my email joseignaciohernandezh at gmail dot com.

Acknowledgements

Parts of this project were developed with the assistance of Claude by Anthropic.

Disclaimer

This software is provided for free and as it is, say with no warranty, and neither me nor my current institution is liable of any consequence of the use of it. In any case, integrity checks have been performed by comparing results with alternative software.

References

  • Bierlaire, M. (2003). BIOGEME: A free package for the estimation of discrete choice models. In Swiss transport research conference.
  • Kuhfeld, W. F. (2005). Experimental design, efficiency, coding, and choice designs. Marketing research methods in SAS: Experimental design, choice, conjoint, and graphical techniques, 47-97.
  • Quan, W., Rose, J. M., Collins, A. T., & Bliemer, M. C. (2011). A comparison of algorithms for generating efficient choice experiments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

choicedesign-1.0.1.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

choicedesign-1.0.1-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file choicedesign-1.0.1.tar.gz.

File metadata

  • Download URL: choicedesign-1.0.1.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.13.1 Darwin/25.4.0

File hashes

Hashes for choicedesign-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9988e5dd2705319aaee0b63d32156611b57b3348c4f35fb4fdd4383e35353d73
MD5 3762807479d33ae030be837b095d1fa6
BLAKE2b-256 ac5c47388ff0045d4acf122362fcd0416d05dff09841dd2fe9206cbba2fac213

See more details on using hashes here.

File details

Details for the file choicedesign-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: choicedesign-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.13.1 Darwin/25.4.0

File hashes

Hashes for choicedesign-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f2e6742b3e7dfc069e6124817b26d570f8792de2ae83a241c589b5e48a8d08e
MD5 e141e85c06478c7fd802a2722155ff96
BLAKE2b-256 b9bb1e89a0a847528acaa51b7fbf145796b758a6f898ad16c36217507efb131c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page