===============
Embedded Voting
===============
.. image:: https://img.shields.io/pypi/v/embedded_voting.svg
:target: https://pypi.python.org/pypi/embedded_voting
.. image:: https://img.shields.io/travis/TheoDlmz/embedded_voting.svg
:target: https://travis-ci.org/TheoDlmz/embedded_voting
.. image:: https://readthedocs.org/projects/embedded-voting/badge/?version=latest
:target: https://embedded-voting.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://codecov.io/gh/TheoDlmz/embedded_voting/branch/master/graphs/badge.svg
:target: https://codecov.io/gh/TheoDlmz/embedded_voting/branch/master/graphs/badge
:alt: Code Coverage
This contains the code for the work on embedded voting done during my internship at Nokia
* Free software: GNU General Public License v3
* Documentation: https://embedded-voting.readthedocs.io.
Features
--------
* Create a voting profile in which voters are associated to embeddings.
* Run elections on these profiles with different rules, using the geometrical aspects of the embeddings.
* The rules are defined for cardinal preferences, but some of them are adapted for the case of ordinal preferences.
* There are rules for single-winner elections and multi-winner elections.
* Classes to analyse the evolution of the score when the embeddings of one voter are changing.
* Classes to analyse the manipulability of the rules.
* Classes for algorithm aggregation.
* A lot of tutorials.
Credits
-------
This package was created with Cookiecutter_ and the `francois-durand/package_helper`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`francois-durand/package_helper`: https://github.com/francois-durand/package_helper
=======
History
=======
0.1.6 (2023-01-23)
-------------------------------
* `Aggregators`:
* Possibility to add or not the current ratings to the training set.
* `Embeddings`:
* The parameter `norm` has no default value (instead of `True`).
* Fix a bug: when `norm=False`, the values of the attributes `n_voter` and `n_dim` were swapped by mistake.
* Rename method `scored` to `times_ratings_candidate`.
* Rename method `_get_center` to `get_center`, so that it is now part of the API.
* Rename method `normalize` to `normalized`, `recenter` to `recentered`, `dilate` to `dilated` because they
return a new `Embeddings` object (not modify the object in place).
* Fix a bug in method `get_center`.
* Methods `get_center`, `recentered` and `dilated` now also work with non-normalized embeddings.
* Document that `dilated` can output embeddings that are not in the positive orthant.
* Add `dilated_new`: new dilatation method whose output is in the positive orthant.
* Add `recentered_and_dilated`: recenter and dilate the embeddings (using `dilated_new`).
* Add `mixed_with`: mix the given `Embeddings` object with another one.
* Rename `plot_scores` to `plot_ratings_candidate`.
* Embeddings generators:
* Rename `EmbeddingsGeneratorRandom` to `EmbeddingsGeneratorUniform`.
* Add `EmbeddingsGeneratorFullyPolarized`: create embeddings that are random vectors of the canonical basis.
* `EmbeddingsGeneratorPolarized` now relies on `EmbeddingsGeneratorUniform`, `EmbeddingsGeneratorFullyPolarized`
and the method `Embeddings.mixed_with`.
* Move `EmbeddingCorrelation` and renamed it.
* Rewrote the `EmbeddingsFromRatingsCorrelation` and how it compute the number of singular values to take.
* Epistemic ratings generators:
* Add `TruthGenerator`: a generator for the ground truth ("true value") of each candidate.
* Add `TruthGeneratorUniform`: a uniform generator for the ground truth ("true value") of each candidate.
* `RatingsGeneratorEpistemic` and its subclasses now take a `TruthGenerator` as parameter.
* Add `RatingsGeneratorEpistemicGroups` as an intermediate class between the parent class `RatingsGeneratorEpistemic`
and the child classes using groups of voters.
* `RatingsGeneratorEpistemic` now do not take groups sizes as parameter: only `RatingsGeneratorEpistemicGroups`
and its subclasses do.
* Rename `RatingsGeneratorEpistemicGroupedMean` to `RatingsGeneratorEpistemicGroupsMean`,
`RatingsGeneratorEpistemicGroupedMix` to `RatingsGeneratorEpistemicGroupsMix`
`RatingsGeneratorEpistemicGroupedNoise` to `RatingsGeneratorEpistemicGroupsNoise`.
* Remove method `RatingsGeneratorEpistemic.generate_true_values`: the same result can be obtained with
`RatingsGeneratorEpistemic.truth_generator`.
* Add `RatingsGeneratorEpistemicGroupedMixFree` and `RatingsGeneratorEpistemicGroupsMixScale`.
* Ratings generators:
* `RatingsGenerator` and subclasses: remove `*args` in call because it was not used.
* `RatingsGeneratorUniform`: add optional parameters `minimum_rating` and `maximum_rating`.
* Possibility to save scores in a csv file
* `RatingsFromEmbeddingsCorrelated`:
* Move parameter `coherence` from `__call__` to `__init__`.
* Rename parameter `scores_matrix` to `ratings_dim_candidate`.
* Parameters `n_dim` and `n_candidates` are optional if `ratings_dim_candidate` is specified.
* Add optional parameters `minimum_random_rating`, `maximum_random_rating` and `clip`.
* Parameter `clip` now defaults to `False` (the former version behaved as if `clip` was always True).
* Single-winner rules:
* Rename `ScoringRule` to `Rule`.
* Rename all subclasses accordingly. For example, rename `FastNash` to `RuleFastNash`.
* Rename `SumScores` to `RuleSumRatings` and `ProductScores` to `RuleProductRatings`.
* Rename `RulePositionalExtension` to `RulePositional` and rename subclasses accordingly.
* Rename `RuleInstantRunoffExtension` to `RuleInstantRunoff`.
* Add `RuleApprovalSum`, `RuleApprovalProduct`, `RuleApprovalRandom`.
* Changed the default renormalization function in `RuleFast`.
* Change the method in `RuleMLEGaussian`.
* Add `RuleModelAware`.
* Add `RuleRatingsHistory`.
* Add `RuleShiftProduct` which replace `RuleProductRatings`.
* Multiwinner rules: rename all rules with prefix `MultiwinnerRule`. For example, rename `IterFeatures` to
`MultiwinnerRuleIterFeatures`.
* Manipulation:
* Rename `SingleVoterManipulation` to `Manipulation` and rename subclasses accordingly.
* Rename `SingleVoterManipulationExtension` to `ManipulationOrdinal` and rename subclasses accordingly.
* Rename `ManipulationCoalitionExtension` to `ManipulationCoalitionOrdinal` and rename subclasses accordingly.
* Rename `AggregatorSum` to `AggregatorSumRatings` and `AggregatorProduct` to `AggregatorProductRatings`.
* Add `max_angular_dilatation_factor`: maximum angular dilatation factor to stay in the positive orthant.
* Rename `create_3D_plot` to `create_3d_plot`.
* Moved function to the utils module.
* Reorganize the file structure of the project.
0.1.5 (2022-01-04)
------------------
* Aggregator functions.
* Online learning.
* Refactoring Truth epistemic generators.
* Rule taking history into account.
0.1.4 (2021-12-06)
------------------
* New version with new structure for Ratings and Embeddings
0.1.3 (2021-10-27)
------------------
* New version with new internal structure for the library
0.1.2 (2021-07-05)
------------------
* New version with handy way to use the library for algorithm aggregation and epistemic social choice
0.1.1 (2021-04-02)
------------------
* Minor bugs.
0.1.0 (2021-03-31)
------------------
* End of the internship, first release on PyPI.
Raw data
{
"_id": null,
"home_page": "https://github.com/TheoDlmz/embedded_voting",
"name": "embedded-voting",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "embedded_voting",
"author": "Th\u00e9o Delemazure",
"author_email": "theo.delemazure@ens.fr",
"download_url": "https://files.pythonhosted.org/packages/f1/3a/f0594c1565e7bde03eb2cc68289e93308247b76c668b9ebfbc329f610098/embedded_voting-0.1.6.tar.gz",
"platform": null,
"description": "===============\nEmbedded Voting\n===============\n\n\n.. image:: https://img.shields.io/pypi/v/embedded_voting.svg\n :target: https://pypi.python.org/pypi/embedded_voting\n\n.. image:: https://img.shields.io/travis/TheoDlmz/embedded_voting.svg\n :target: https://travis-ci.org/TheoDlmz/embedded_voting\n\n.. image:: https://readthedocs.org/projects/embedded-voting/badge/?version=latest\n :target: https://embedded-voting.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\n.. image:: https://codecov.io/gh/TheoDlmz/embedded_voting/branch/master/graphs/badge.svg\n :target: https://codecov.io/gh/TheoDlmz/embedded_voting/branch/master/graphs/badge\n :alt: Code Coverage\n\n\n\n\n\nThis contains the code for the work on embedded voting done during my internship at Nokia\n\n\n* Free software: GNU General Public License v3\n* Documentation: https://embedded-voting.readthedocs.io.\n\n\nFeatures\n--------\n\n* Create a voting profile in which voters are associated to embeddings.\n* Run elections on these profiles with different rules, using the geometrical aspects of the embeddings.\n* The rules are defined for cardinal preferences, but some of them are adapted for the case of ordinal preferences.\n* There are rules for single-winner elections and multi-winner elections.\n* Classes to analyse the evolution of the score when the embeddings of one voter are changing.\n* Classes to analyse the manipulability of the rules.\n* Classes for algorithm aggregation.\n* A lot of tutorials.\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `francois-durand/package_helper`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`francois-durand/package_helper`: https://github.com/francois-durand/package_helper\n\n\n=======\nHistory\n=======\n\n0.1.6 (2023-01-23)\n-------------------------------\n\n* `Aggregators`:\n * Possibility to add or not the current ratings to the training set.\n\n* `Embeddings`:\n\n * The parameter `norm` has no default value (instead of `True`).\n * Fix a bug: when `norm=False`, the values of the attributes `n_voter` and `n_dim` were swapped by mistake.\n * Rename method `scored` to `times_ratings_candidate`.\n * Rename method `_get_center` to `get_center`, so that it is now part of the API.\n * Rename method `normalize` to `normalized`, `recenter` to `recentered`, `dilate` to `dilated` because they\n return a new `Embeddings` object (not modify the object in place).\n * Fix a bug in method `get_center`.\n * Methods `get_center`, `recentered` and `dilated` now also work with non-normalized embeddings.\n * Document that `dilated` can output embeddings that are not in the positive orthant.\n * Add `dilated_new`: new dilatation method whose output is in the positive orthant.\n * Add `recentered_and_dilated`: recenter and dilate the embeddings (using `dilated_new`).\n * Add `mixed_with`: mix the given `Embeddings` object with another one.\n * Rename `plot_scores` to `plot_ratings_candidate`.\n\n* Embeddings generators:\n\n * Rename `EmbeddingsGeneratorRandom` to `EmbeddingsGeneratorUniform`.\n * Add `EmbeddingsGeneratorFullyPolarized`: create embeddings that are random vectors of the canonical basis.\n * `EmbeddingsGeneratorPolarized` now relies on `EmbeddingsGeneratorUniform`, `EmbeddingsGeneratorFullyPolarized`\n and the method `Embeddings.mixed_with`.\n * Move `EmbeddingCorrelation` and renamed it.\n * Rewrote the `EmbeddingsFromRatingsCorrelation` and how it compute the number of singular values to take.\n\n* Epistemic ratings generators:\n\n * Add `TruthGenerator`: a generator for the ground truth (\"true value\") of each candidate.\n * Add `TruthGeneratorUniform`: a uniform generator for the ground truth (\"true value\") of each candidate.\n * `RatingsGeneratorEpistemic` and its subclasses now take a `TruthGenerator` as parameter.\n * Add `RatingsGeneratorEpistemicGroups` as an intermediate class between the parent class `RatingsGeneratorEpistemic`\n and the child classes using groups of voters.\n * `RatingsGeneratorEpistemic` now do not take groups sizes as parameter: only `RatingsGeneratorEpistemicGroups`\n and its subclasses do.\n * Rename `RatingsGeneratorEpistemicGroupedMean` to `RatingsGeneratorEpistemicGroupsMean`,\n `RatingsGeneratorEpistemicGroupedMix` to `RatingsGeneratorEpistemicGroupsMix`\n `RatingsGeneratorEpistemicGroupedNoise` to `RatingsGeneratorEpistemicGroupsNoise`.\n * Remove method `RatingsGeneratorEpistemic.generate_true_values`: the same result can be obtained with\n `RatingsGeneratorEpistemic.truth_generator`.\n * Add `RatingsGeneratorEpistemicGroupedMixFree` and `RatingsGeneratorEpistemicGroupsMixScale`.\n\n* Ratings generators:\n\n * `RatingsGenerator` and subclasses: remove `*args` in call because it was not used.\n * `RatingsGeneratorUniform`: add optional parameters `minimum_rating` and `maximum_rating`.\n * Possibility to save scores in a csv file\n\n* `RatingsFromEmbeddingsCorrelated`:\n\n * Move parameter `coherence` from `__call__` to `__init__`.\n * Rename parameter `scores_matrix` to `ratings_dim_candidate`.\n * Parameters `n_dim` and `n_candidates` are optional if `ratings_dim_candidate` is specified.\n * Add optional parameters `minimum_random_rating`, `maximum_random_rating` and `clip`.\n * Parameter `clip` now defaults to `False` (the former version behaved as if `clip` was always True).\n\n* Single-winner rules:\n\n * Rename `ScoringRule` to `Rule`.\n * Rename all subclasses accordingly. For example, rename `FastNash` to `RuleFastNash`.\n * Rename `SumScores` to `RuleSumRatings` and `ProductScores` to `RuleProductRatings`.\n * Rename `RulePositionalExtension` to `RulePositional` and rename subclasses accordingly.\n * Rename `RuleInstantRunoffExtension` to `RuleInstantRunoff`.\n * Add `RuleApprovalSum`, `RuleApprovalProduct`, `RuleApprovalRandom`.\n * Changed the default renormalization function in `RuleFast`.\n * Change the method in `RuleMLEGaussian`.\n * Add `RuleModelAware`.\n * Add `RuleRatingsHistory`.\n * Add `RuleShiftProduct` which replace `RuleProductRatings`.\n\n* Multiwinner rules: rename all rules with prefix `MultiwinnerRule`. For example, rename `IterFeatures` to\n `MultiwinnerRuleIterFeatures`.\n\n* Manipulation:\n\n * Rename `SingleVoterManipulation` to `Manipulation` and rename subclasses accordingly.\n * Rename `SingleVoterManipulationExtension` to `ManipulationOrdinal` and rename subclasses accordingly.\n * Rename `ManipulationCoalitionExtension` to `ManipulationCoalitionOrdinal` and rename subclasses accordingly.\n\n* Rename `AggregatorSum` to `AggregatorSumRatings` and `AggregatorProduct` to `AggregatorProductRatings`.\n* Add `max_angular_dilatation_factor`: maximum angular dilatation factor to stay in the positive orthant.\n* Rename `create_3D_plot` to `create_3d_plot`.\n* Moved function to the utils module.\n* Reorganize the file structure of the project.\n\n0.1.5 (2022-01-04)\n------------------\n\n* Aggregator functions.\n* Online learning.\n* Refactoring Truth epistemic generators.\n* Rule taking history into account.\n\n0.1.4 (2021-12-06)\n------------------\n\n* New version with new structure for Ratings and Embeddings\n\n0.1.3 (2021-10-27)\n------------------\n\n* New version with new internal structure for the library\n\n0.1.2 (2021-07-05)\n------------------\n\n* New version with handy way to use the library for algorithm aggregation and epistemic social choice\n\n\n0.1.1 (2021-04-02)\n------------------\n\n* Minor bugs.\n\n0.1.0 (2021-03-31)\n------------------\n\n* End of the internship, first release on PyPI.\n\n",
"bugtrack_url": null,
"license": "GNU General Public License v3",
"summary": "This contains the code for the work on embedded voting done during my internship at Nokia",
"version": "0.1.6",
"split_keywords": [
"embedded_voting"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b02c89f3fc8ac286088faefd0abfce0f014560adf3733a9b864a760839b7c9e9",
"md5": "75b41ad4f30b48a3a6708924da437273",
"sha256": "712b06ed2c9b663dd8f2c32c13488bb01eaea02aa7f3da178442ce895a55b6c8"
},
"downloads": -1,
"filename": "embedded_voting-0.1.6-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "75b41ad4f30b48a3a6708924da437273",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.8",
"size": 111091,
"upload_time": "2023-01-23T12:42:41",
"upload_time_iso_8601": "2023-01-23T12:42:41.702905Z",
"url": "https://files.pythonhosted.org/packages/b0/2c/89f3fc8ac286088faefd0abfce0f014560adf3733a9b864a760839b7c9e9/embedded_voting-0.1.6-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f13af0594c1565e7bde03eb2cc68289e93308247b76c668b9ebfbc329f610098",
"md5": "8be41b146157456d2c2d7a845e4636ee",
"sha256": "422bea3a99a58810015b226531e237ae45b474aa94e7b96fa5cd7c7d535b5136"
},
"downloads": -1,
"filename": "embedded_voting-0.1.6.tar.gz",
"has_sig": false,
"md5_digest": "8be41b146157456d2c2d7a845e4636ee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 91912,
"upload_time": "2023-01-23T12:42:43",
"upload_time_iso_8601": "2023-01-23T12:42:43.928016Z",
"url": "https://files.pythonhosted.org/packages/f1/3a/f0594c1565e7bde03eb2cc68289e93308247b76c668b9ebfbc329f610098/embedded_voting-0.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-23 12:42:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "TheoDlmz",
"github_project": "embedded_voting",
"travis_ci": true,
"coveralls": true,
"github_actions": false,
"requirements": [],
"tox": true,
"lcname": "embedded-voting"
}