tf.math.lbeta
Stay organized with collections
Save and categorize content based on your preferences.
Computes \(ln(|Beta(x)|)\), reducing along the last dimension.
tf.math.lbeta(
x, name=None
)
Given one-dimensional z = [z_0,...,z_{K-1}]
, we define
$$Beta(z) = \prod_j Gamma(z_j) / Gamma(\sum_j z_j)$$
And for n + 1
dimensional x
with shape [N1, ..., Nn, K]
, we define
$$lbeta(x)[i1, ..., in] = Log(|Beta(x[i1, ..., in, :])|)$$
.
In other words, the last dimension is treated as the z
vector.
Note that if z = [u, v]
, then
\(Beta(z) = int_0^1 t^{u-1} (1 - t)^{v-1} dt\), which defines the
traditional bivariate beta function.
If the last dimension is empty, we follow the convention that the sum over
the empty set is zero, and the product is one.
Args |
x
|
A rank n + 1 Tensor , n >= 0 with type float , or double .
|
name
|
A name for the operation (optional).
|
Returns |
The logarithm of \(|Beta(x)|\) reducing along the last dimension.
|
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 2020-10-01 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 2020-10-01 UTC."],[],[],null,["# tf.math.lbeta\n\n|-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/math/lbeta) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/python/ops/special_math_ops.py#L40-L86) |\n\nComputes \\\\(ln(\\|Beta(x)\\|)\\\\), reducing along the last dimension.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.lbeta`](/api_docs/python/tf/math/lbeta), [`tf.compat.v1.math.lbeta`](/api_docs/python/tf/math/lbeta)\n\n\u003cbr /\u003e\n\n tf.math.lbeta(\n x, name=None\n )\n\nGiven one-dimensional `z = [z_0,...,z_{K-1}]`, we define \n$$Beta(z) = \\\\prod_j Gamma(z_j) / Gamma(\\\\sum_j z_j)$$\n\nAnd for `n + 1` dimensional `x` with shape `[N1, ..., Nn, K]`, we define \n$$lbeta(x)\\[i1, ..., in\\] = Log(\\|Beta(x\\[i1, ..., in, :\\])\\|)$$\n\n.\n\nIn other words, the last dimension is treated as the `z` vector.\n\nNote that if `z = [u, v]`, then\n\\\\(Beta(z) = int_0\\^1 t\\^{u-1} (1 - t)\\^{v-1} dt\\\\), which defines the\ntraditional bivariate beta function.\n\nIf the last dimension is empty, we follow the convention that the sum over\nthe empty set is zero, and the product is one.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|-------------------------------------------------------------------|\n| `x` | A rank `n + 1` `Tensor`, `n \u003e= 0` with type `float`, or `double`. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| The logarithm of \\\\(\\|Beta(x)\\|\\\\) reducing along the last dimension. ||\n\n\u003cbr /\u003e"]]