# tff.analytics.IbltFactory

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |

Factory for string and values aggregation by IBLT.

Inherits From: [`UnweightedAggregationFactory`](https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/UnweightedAggregationFactory)

    tff.analytics.IbltFactory(
        *,
        capacity: int,
        string_max_bytes: int,
        encoding: https://www.tensorflow.org/federated/api_docs/python/tff/analytics/heavy_hitters/iblt/CharacterEncoding = https://www.tensorflow.org/federated/api_docs/python/tff/analytics/heavy_hitters/iblt/CharacterEncoding#UTF8,
        repetitions: int,
        seed: int = 0,
        sketch_agg_factory: Optional[https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/UnweightedAggregationFactory] = None,
        value_tensor_agg_factory: Optional[https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/UnweightedAggregationFactory] = None
    ) -> None

<br />

<br />

<br />

| ## Args ||
|---|---|
| `capacity` | The capacity of the IBLT sketch. Must be positive. |
| `string_max_bytes` | The maximum length in bytes of a string in the IBLT. Must be positive. |
| `encoding` | The character encoding of the string data to encode. For non-character binary data or strings with unknown encoding, specify [`CharacterEncoding.UNKNOWN`](https://www.tensorflow.org/federated/api_docs/python/tff/analytics/heavy_hitters/iblt/CharacterEncoding#UNKNOWN). |
| `repetitions` | The number of repetitions in IBLT data structure (must be \>= 3). Must be at least `3`. |
| `seed` | An integer seed for hash functions. Defaults to 0. |
| `sketch_agg_factory` | (Optional) A `UnweightedAggregationFactory` specifying the value aggregation to sum IBLT sketches. Defaults to [`tff.aggregators.SumFactory`](https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/SumFactory). If `sketch_agg_factory` is set to a [`tff.aggregators.SecureSumFactory`](https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/SecureSumFactory), then the `upper_bound_threshold` should be at least 2 \*\* 32 - 1. |
| `value_tensor_agg_factory` | (Optional) A `UnweightedAggregationFactory` specifying the value aggregation to sum value tensors. Defaults to [`tff.aggregators.SumFactory`](https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/SumFactory). Note that when using `sketch_agg_factory` is set to a [`tff.aggregators.SecureSumFactory`](https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/SecureSumFactory), the value to be summed might be clipped depends on the choices of `upper_bound_threshold` and `lower_bound_threshold` parameters in `SecureSumFactory`. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if parameters don't meet expectations. |

<br />

## Methods

### `create`

[View source](https://github.com/tensorflow/federated/blob/v0.87.0
Version 2.0, January 2004
Licensed under the Apache License, Version 2.0 (the)

    create(
        value_type: https://www.tensorflow.org/federated/api_docs/python/tff/types/SequenceType
    ) -> https://www.tensorflow.org/federated/api_docs/python/tff/templates/AggregationProcess

Creates an AggregationProcess using IBLT to aggregate strings.

<br />

<br />

<br />

| Args ||
|---|---|
| `value_type` | A [`tff.SequenceType`](https://www.tensorflow.org/federated/api_docs/python/tff/types/SequenceType) representing the type of the input dataset, must be compatible with the following [`tff.Type`](https://www.tensorflow.org/federated/api_docs/python/tff/types/Type): tff.SequenceType(collections.OrderedDict(\[ (DATASET*KEY, np.str*), (DATASET_VALUE, tff.TensorType(shape=\[None\], dtype=np.int64)), \])) |

<br />

<br />

<br />

<br />

| Raises ||
|---|---|
| `ValueError` | If `value_type` is not as expected. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| A [`tff.templates.AggregationProcess`](https://www.tensorflow.org/federated/api_docs/python/tff/templates/AggregationProcess) to aggregate strings and values associate with the strings. ||

<br />