tff.analytics.heavy_hitters.iblt.RandomHyperEdgeHasher
Stay organized with collections
Save and categorize content based on your preferences.
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.
Args |
seed
|
An integer seed for hash functions.
|
table_size
|
The hash table size of the IBLT. Must be a positive integer.
|
repetitions
|
The number of repetitions in IBLT data structure. Must be an
integer at least 3.
|
Raises |
ValueError
|
If arguments do not meet expectations.
|
Methods
get_hash_indices_tf
View source
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) .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-20 UTC."],[],[]]