Poisson-approval

Latest version: v0.31.0

Safety actively analyzes 688600 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

0.12.0

-----------------------------------------------------------------

* Add ``GeneratorProfileHistogramSinglePeakedUniform``: a generator of single-peaked histogram-profiles following
the uniform distribution.
* Add examples of functions to be used as update ratios for ``ProfileCardinal.fictitious_play``:
``one_over_t_plus_one``, ``one_over_sqrt_t_plus_one``, ``one_over_log_t_plus_two``,
``one_over_log_log_t_plus_fifteen``.

-----------------------------------------------------------------------------

0.11.0

-----------------------------------------------------------------------------

* ``ProfileCardinal.iterated_voting`` and ``ProfileCardinal.fictitious_play`` now also output the winning frequency of
each candidate (limit frequency in case of convergence, frequency over the history otherwise).
* New utilities:

* Add ``candidates_to_d_candidate_probability``: convert a set of candidates to a dictionary of probabilities (random
tie-break)
* Add ``candidates_to_probabilities``: convert a set of candidates to an array of probabilities (random tie-break).
* Add ``array_to_d_candidate_value``: convert an array to a dictionary of candidates and values.
* Add ``d_candidate_value_to_array``: convert a dictionary of candidates and values to an array.

--------------------------------------------------------

0.10.0

--------------------------------------------------------

* Implement ``ProfileDiscrete.analyzed_strategies``: exhaustive analysis of all pure strategies of the profile.

------------------------------------------------

0.9.0

------------------------------------------------

* Implement Plurality and Anti-plurality (cf. the corresponding tutorial).
* Python 3.5 is not officially supported anymore. However, in practice, the package should still essentially work with
Python 3.5, the only notable difference being the order in which the dictionaries are printed.
* New utilities:

* Add ``ballot_two``: ballot for the second candidate of a ranking (used for Plurality).
* Add ``ballot_one_three``: ballot against the second candidate of a ranking (used for Anti-plurality).
* Add ``ballot_low_u`` and ``ballot_high_u``: the ballot chosen by the voters who have a low (resp. high) utility
for their middle candidate, depending on the voting rule.
* Add ``product_dict``: Cartesian product for a dictionary of iterables.
* Add ``DictPrintingInOrderIgnoringNone``: dictionary that prints in the order of the keys, ignoring value None.
* In the ``UtilCache`` module, add ``property_deleting_cache``: define a property that deletes the cache when set or
deleted. This is used for parameters like ``ratio_sincere``, ``voting_rule``, etc.

-----------------------------------------------------------------

0.8.1

-----------------------------------------------------------------

* ``BestResponse``: the focus of this release is to correct rare bugs that used to happen when some offsets are very
close to 1.

* API change: ``BestResponse`` now takes as parameters the tau-vector and the ranking, instead of all the events
that are used for the computation.
* Exchanged the justifications ``'Easy vs difficult pivot'`` and ``'Difficult vs easy pivot'`` (their usages
were switched, even if the result itself was correct).
* Use the asymptotic method only when there are two consecutive zeros in the "compass diagram" of the tau-vector
(instead of: whenever it gives a result). The motivation is that the asymptotic method may rely on events that rely
more on numerical approximation than the limit pivot theorem approach.
* To determine whether pivots are easy or difficult, we rely on expected scores in the duo events, instead of the
pseudo-offsets of the trio. The motivation is that in some cases, the trio is computed with a numerical optimizer
that relies more on numerical approximation than the duo events, which use only basic operations like addition,
multiplication, etc. In the rare cases where the two methods differ, the latter is thus more reliable.
* Add a sub-algorithm of the "Offset method", called "Offset method with trio
approximation correction". This is used in some rare cases where both pivots are difficult, but the numeric
approximations of the trio event lead to an offset that is equal or even slightly greater than 1 (which is abnormal
and leads to infinite geometric sums). In those cases, we now consider that the offset is lower and infinitely close
to 1.
* Corrected a bug in the asymptotic method that could happen when the two personalized pivots had very close
magnitudes. This uses the correction of ``Asymptotic.limit`` mentioned below.

* ``TauVector``: added the attribute ``has_two_consecutive_zeros``.

* ``Event``: now computes the pseudo-offsets, e.g. ``psi_a``, ``psi_ab``, etc.

* ``Asymptotic``: handles some edge cases more nicely.

* ``__str__`` displays a coefficient as 0, 1 or -1 only if it is equal to that value. Close is not enough.
* ``limit`` does not use closeness to 0. It is not its role to decide what coefficients are negligible in the context.
Only operations like multiplication are allowed to use closeness: for example, if ``mu_1`` and ``- mu_2`` are
relatively close, the multiplication operator is allowed to decide that ``mu_1 + mu_2`` is equal to 0.
* In multiplication, when the two magnitudes are close, the resulting magnitude is now always equal to the maximum.
The same applies for the resulting `nu` when the `nu`'s are also equal.

* ``cached_property``: corrected a bug. In the case of nested cached properties, the inner one was sometimes not
recorded in cache. It did not lead to incorrect results but slowed down the program.

----------------------------------

0.8.0

----------------------------------

* Implement the notion of fanatic voting, a variant of sincere voting: a given ratio of voters vote for their top
candidate only. This is implemented for all subclasses of ``Profile``.
* The utility ``barycenter`` now accepts iterables.
* Corrected bug: ``Profile.standardized_version`` now takes into account the auxiliary parameters like
``ratio_sincere``, ``well_informed_voters``, etc.

-----------------------------------

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.