Hashes a string to a list of independently sampled indices.
tff.analytics.heavy_hitters.iblt.RandomHyperEdgeHasher(
seed: int, table_size: int, repetitions: int
)
For a string, generates a set of indices such that each index is independently sampled uniformly at random.
Methods
get_hash_indices_tf
get_hash_indices_tf(
input_strings: tf.Tensor
) -> tf.Tensor
Returns a tf.Tensor
containing the indices of input_string
in IBLT.
Args | |
---|---|
input_strings
|
A 1-d tf.Tensor of strings.
|
Returns | |
---|---|
A tf.Tensor of shape (input_length, repetitions, 3) containing value
i at index (i, r, 0) , value r at index (i, r, 1) and the
hash-index of the i-th input string in repetition r at index
(i, r, 2) .
|