Save the date! Google I/O returns May 18-20 Register now


Aggregation factory for unweighted mean.

Inherits From: UnweightedAggregationFactory

The created tff.templates.AggregationProcess computes the unweighted mean of values placed at CLIENTS, and outputs the mean placed at SERVER.

The input arguments of the next attribute of the process returned by create are <state, value>, and the unweighted mean refers to the expression sum(value * weight) / count(value) where count(value) is the cardinality of the CLIENTS placement.

The implementation is parameterized by an inner aggregation factory responsible for the summation of values.

value_sum_factory An optional tff.aggregators.UnweightedAggregationFactory responsible for summation of values. If not specified, tff.aggregators.SumFactory is used.

TypeError If provided value_sum_factory is not an instance of tff.aggregators.UnweightedAggregationFactory.



View source

Creates a tff.aggregators.AggregationProcess without weights.

The provided value_type is a non-federated tff.Type object, that is, value_type.is_federated() should return False.

The returned tff.aggregators.AggregationProcess will be created for aggregation of values matching value_type placed at tff.CLIENTS. That is, its next method will expect type <S@SERVER, {value_type}@CLIENTS>, where S is the unplaced return type of its initialize method.

value_type A non-federated tff.Type (value_type.is_federated() returns False).

A tff.templates.AggregationProcess.