Algorithms to sample preferences of all kinds.
Project description
PrefSampling
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
andnum_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
intest_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for prefsampling-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e5789a53ba625c1ac087df3b192c7250485564a6d7893436148cbc9c9dd105f |
|
MD5 | cc095a9a6e953f027ffa7458dfc0e622 |
|
BLAKE2b-256 | b7f1e5bd629cdd32273d963a0e6adcce02a5f0d25128bf8503effad679f9dcc7 |