Thanks for tuning in to Google I/O. View all sessions on demandWatch on demand

tff.analytics.heavy_hitters.iblt.decode_iblt_tensor_tf

Decode a IBLT sketch.

This function wraps IbltDecoder to decode iblt and returns frequencies of decoded strings.

iblt Tensor representing the IBLT computed by the IbltEncoder.
iblt_values Tensor representing the IBLT values computed by the IbltEncoder.
capacity Number of distinct strings that we expect to be inserted.
string_max_bytes Maximum length of a string in bytes that can be inserted.
value_shape Shape of the values tensor.
encoding The character encoding of the string data to decode. For non-character binary data or strings with unknown encoding, specify CharacterEncoding.UNKNOWN.
seed Integer seed for hash functions. Defaults to 0.
repetitions Number of repetitions in IBLT data structure (must be >= 3). Defaults to 3.
hash_family A str specifying the hash family to use to construct IBLT. Options include coupled or random, default is chosen based on capacity.
hash_family_params An optional dict of parameters that the hash family hasher expects. Defaults are chosen based on capacity.
field_size The field size for all values in IBLT. Defaults to 2**31 - 1.

(out_strings, out_counts, out_tensor_counts num_not_decoded) where out_strings is a tf.Tensor containing all the decoded strings, out_counts is a tf.Tensor containing the counts of each string, out_tensor_counts is a tf.Tensor containing tensor counts for each decoded string and num_not_decoded is a tf.Tensor with the number of items not decoded in the IBLT.
{"cc_re__cc_re__cc_by_4_0": ["or counts for each\ndecoded string and <code translate=\"no\" dir=\"ltr\">num_not_decoded</code> is a <a href=\"https://tensorflow.google.cn/api_docs/python/tf/Tensor\"><code translate=\"no\" dir=\"ltr\">tf.Tensor</code></a> with the number of\nitems not decoded in the IBLT.\n</td>\n</tr></p>\n\n<p></table></p>\n\n  \n\n  \n</div>\n\n  \n\n  \n    \n    \n      \n       \n    \n    \n  \n\n  \n  \n</article>\n\n\n<devsite-content-footer class=\"nocontent\">\n  <p>Except as otherwise noted, the content of this page is licensed under the <a href=\"https://creativecommons.org/licenses/by/4.0/\">Creative Commons Attribution 4.0 License</a>, and code samples are licensed under the <a href=\"https://www.apache.org/licenses/LICENSE-2.0\">Apache 2.0 License</a>. For details, see the <a href=\"https://developers.google.cn/site-policies\">Google Developers Site Policies</a>. Java is a registered trademark of Oracle and/or its affiliates.</p>\n  <p>Last updated 2023-05-19 UTC.</p>\n</devsite-content-footer>\n\n\n<devsite-notification\n>\n</devsite-notification>\n\n\n  \n<div class=\"devsite-content-data\">\n  <"]}