Skip to main content

Algorithms to sample preferences of all kinds.

Project description

PrefSampling

Build badge codecov

A small package providing all the algorithms to sample preferences

Development

We try to enforce uniformity within the package. Here are some general guidelines.

  • All samplers have num_agents and num_candidates as their first positional arguments
  • All samplers accept a seed parameter to set the seed of the random number generator

The tests are run with unittest. This is the procedure when adding a new sampler.

  • Add the sampler to the list ALL_SAMPLERS in test_samplers.py. The basic requirements (parameters, validation, etc.) that any sampler need to satisfy will then be checked.
  • Add the sampler to corresponding test file for its ballot format (e.g., test_ordinal_samplers.py).
  • If needed, add a file test_ballotformat_samplername.py for tests that are specific to the sampler.

The doc is generated using sphinx. We use the numpy style guide. The napoleon extension for Sphinx is used and the HTML style is defined by the Book Sphinx Theme.

To generate the doc, first move inside the docs-source folder and run the following:

make clean 
make html

This will generate the documentation locally (in the folder docs-source/build). If you want the documentation to also be updated when pushing, run:

make github

After having pushed, the documentation will automatically be updated.

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

prefsampling-0.0.1.tar.gz (24.9 kB view hashes)

Uploaded Source

Built Distribution

prefsampling-0.0.1-py3-none-any.whl (32.2 kB view hashes)

Uploaded Python 3

Supported by

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