()
| 3 | |
| 4 | |
| 5 | def test_unanimous_vote(): |
| 6 | votes = [TierVote(tier_id=0, confidence=0.8), TierVote(tier_id=0, confidence=0.7)] |
| 7 | ens = Ensemble(weights=[0.5, 0.5]) |
| 8 | result = ens.decide(votes) |
| 9 | assert result.tier_id == 0 |
| 10 | assert result.confidence > 0.5 |
| 11 | |
| 12 | |
| 13 | def test_disagreement_goes_with_higher_weight(): |