tfc.distributions.upper_tail
Stay organized with collections
Save and categorize content based on your preferences.
Approximates upper tail quantile for range coding.
tfc.distributions.upper_tail(
distribution, tail_mass
)
For range coding of random variables, the distribution tails need special
handling, because range coding can only handle alphabets with a finite
number of symbols. This method returns a cut-off location for the upper
tail, such that approximately tail_mass
probability mass is contained in
the tails (together). The tails are then handled by using the 'overflow'
functionality of the range coder implementation (using an Elias gamma code).
Returns |
A tf.Tensor broadcastable to shape self.batch_shape containing the
approximate upper tail quantiles for each scalar distribution.
|
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. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tfc.distributions.upper_tail\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/compression/blob/v2.14.1/tensorflow_compression/python/distributions/helpers.py#L186-L219) |\n\nApproximates upper tail quantile for range coding.\n\n#### View aliases\n\n\n**Main aliases**\n\n[`tfc.upper_tail`](https://www.tensorflow.org/api_docs/python/tfc/distributions/upper_tail)\n\n\u003cbr /\u003e\n\n tfc.distributions.upper_tail(\n distribution, tail_mass\n )\n\nFor range coding of random variables, the distribution tails need special\nhandling, because range coding can only handle alphabets with a finite\nnumber of symbols. This method returns a cut-off location for the upper\ntail, such that approximately `tail_mass` probability mass is contained in\nthe tails (together). The tails are then handled by using the 'overflow'\nfunctionality of the range coder implementation (using an Elias gamma code).\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| `distribution` | A [`tfp.distributions.Distribution`](https://www.tensorflow.org/probability/api_docs/python/tfp/distributions/Distribution) object. |\n| `tail_mass` | Float between 0 and 1. Desired probability mass for the tails. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor) broadcastable to shape `self.batch_shape` containing the approximate upper tail quantiles for each scalar distribution. ||\n\n\u003cbr /\u003e"]]