p2pfl.learning.aggregators.krum moduleΒΆ
Krum Aggregator.
- class p2pfl.learning.aggregators.krum.Krum(disable_partial_aggregation=False)[source]ΒΆ
Bases:
Aggregator
Krum [Blanchard et al., 2017].
Paper: https://arxiv.org/pdf/1703.02757
- Parameters:
disable_partial_aggregation (
bool
)
-
SUPPORTS_PARTIAL_AGGREGATION:
bool
= FalseΒΆ
- aggregate(models)[source]ΒΆ
Aggregate using Krum algorithm.
Krum selects the model with the minimum sum of distances to all other models.
- Parameters:
models (
list
[P2PFLModel
]) β List of P2PFLModel objects to aggregate.- Return type:
- Returns:
A P2PFLModel with the selected model (lowest distance sum).
- Raises:
NoModelsToAggregateError β If there are no models to aggregate.