Closed bqth29 closed 11 months ago
All modified lines are covered by tests :white_check_mark:
Files | Coverage Ξ | |
---|---|---|
...rcation/polynomial/base_multivariate_polynomial.py | 100.00% <100.00%> (ΓΈ) |
|
tests/models/test_qubo.py | 100.00% <100.00%> (ΓΈ) |
:loudspeaker: Thoughts on this report? Let us know!.
π¬ Pull Request Description
Following #27, an inspection of the code has been pursued. The problem originated from the fact that in best-only mode, the best objective value return was always retrieved from an argmin function, even if a maximization was carried out. This behavior was fixed by replacing the argmin by an argmax when maximizing.
βοΈ Check list
Before you open the pull request, make sure the following requirements are met.
π New features
No new feature was added.
π Bug fixes
The highest objective value is returned in best-only mode when maximizing (previously, it was still the lowest value).
π£ Supplementary information
The bug that this PR fixes explains the curious pie charts from #27 since as the number of agents increased, the probability of finding a bad value increased as well. As the worst value was returned instead of the best one, the bad values were over represented in the algorithm's outputs. Hence the drop in performance when the number of agents was more important.