Package: embedded-voting
Embedded VotingThis contains the code for the work on embedded voting done during my internship at NokiaFree software: GNU General Public License v3Documentation:https://embedded-voting.readthedocs.io.FeaturesCreate 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.CreditsThis package was created withCookiecutterand thefrancois-durand/package_helperproject template.History0.1.6 (2023-01-23)Aggregators:
* Possibility to add or not the current ratings to the training set.Embeddings:The parameternormhas no default value (instead ofTrue).Fix a bug: whennorm=False, the values of the attributesn_voterandn_dimwere swapped by mistake.Rename methodscoredtotimes_ratings_candidate.Rename method_get_centertoget_center, so that it is now part of the API.Rename methodnormalizetonormalized,recentertorecentered,dilatetodilatedbecause they
return a newEmbeddingsobject (not modify the object in place).Fix a bug in methodget_center.Methodsget_center,recenteredanddilatednow also work with non-normalized embeddings.Document thatdilatedcan output embeddings that are not in the positive orthant.Adddilated_new: new dilatation method whose output is in the positive orthant.Addrecentered_and_dilated: recenter and dilate the embeddings (usingdilated_new).Addmixed_with: mix the givenEmbeddingsobject with another one.Renameplot_scorestoplot_ratings_candidate.Embeddings generators:RenameEmbeddingsGeneratorRandomtoEmbeddingsGeneratorUniform.AddEmbeddingsGeneratorFullyPolarized: create embeddings that are random vectors of the canonical basis.EmbeddingsGeneratorPolarizednow relies onEmbeddingsGeneratorUniform,EmbeddingsGeneratorFullyPolarizedand the methodEmbeddings.mixed_with.MoveEmbeddingCorrelationand renamed it.Rewrote theEmbeddingsFromRatingsCorrelationand how it compute the number of singular values to take.Epistemic ratings generators:AddTruthGenerator: a generator for the ground truth (“true value”) of each candidate.AddTruthGeneratorUniform: a uniform generator for the ground truth (“true value”) of each candidate.RatingsGeneratorEpistemicand its subclasses now take aTruthGeneratoras parameter.AddRatingsGeneratorEpistemicGroupsas an intermediate class between the parent classRatingsGeneratorEpistemicand the child classes using groups of voters.RatingsGeneratorEpistemicnow do not take groups sizes as parameter: onlyRatingsGeneratorEpistemicGroupsand its subclasses do.RenameRatingsGeneratorEpistemicGroupedMeantoRatingsGeneratorEpistemicGroupsMean,RatingsGeneratorEpistemicGroupedMixtoRatingsGeneratorEpistemicGroupsMixRatingsGeneratorEpistemicGroupedNoisetoRatingsGeneratorEpistemicGroupsNoise.Remove methodRatingsGeneratorEpistemic.generate_true_values: the same result can be obtained withRatingsGeneratorEpistemic.truth_generator.AddRatingsGeneratorEpistemicGroupedMixFreeandRatingsGeneratorEpistemicGroupsMixScale.Ratings generators:RatingsGeneratorand subclasses: remove*argsin call because it was not used.RatingsGeneratorUniform: add optional parametersminimum_ratingandmaximum_rating.Possibility to save scores in a csv fileRatingsFromEmbeddingsCorrelated:Move parametercoherencefrom__call__to__init__.Rename parameterscores_matrixtoratings_dim_candidate.Parametersn_dimandn_candidatesare optional ifratings_dim_candidateis specified.Add optional parametersminimum_random_rating,maximum_random_ratingandclip.Parameterclipnow defaults toFalse(the former version behaved as ifclipwas always True).Single-winner rules:RenameScoringRuletoRule.Rename all subclasses accordingly. For example, renameFastNashtoRuleFastNash.RenameSumScorestoRuleSumRatingsandProductScorestoRuleProductRatings.RenameRulePositionalExtensiontoRulePositionaland rename subclasses accordingly.RenameRuleInstantRunoffExtensiontoRuleInstantRunoff.AddRuleApprovalSum,RuleApprovalProduct,RuleApprovalRandom.Changed the default renormalization function inRuleFast.Change the method inRuleMLEGaussian.AddRuleModelAware.AddRuleRatingsHistory.AddRuleShiftProductwhich replaceRuleProductRatings.Multiwinner rules: rename all rules with prefixMultiwinnerRule. For example, renameIterFeaturestoMultiwinnerRuleIterFeatures.Manipulation:RenameSingleVoterManipulationtoManipulationand rename subclasses accordingly.RenameSingleVoterManipulationExtensiontoManipulationOrdinaland rename subclasses accordingly.RenameManipulationCoalitionExtensiontoManipulationCoalitionOrdinaland rename subclasses accordingly.RenameAggregatorSumtoAggregatorSumRatingsandAggregatorProducttoAggregatorProductRatings.Addmax_angular_dilatation_factor: maximum angular dilatation factor to stay in the positive orthant.Renamecreate_3D_plottocreate_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 Embeddings0.1.3 (2021-10-27)New version with new internal structure for the library0.1.2 (2021-07-05)New version with handy way to use the library for algorithm aggregation and epistemic social choice0.1.1 (2021-04-02)Minor bugs.0.1.0 (2021-03-31)End of the internship, first release on PyPI.