Computes the modified Bessel function of order zero.
Defined as:
i 0 ( x ) = J 0 ( i x ) = ∑ m = 0 ∞ 1 m ! Γ ( m + 1 ) ( x 2 ) 2 m
\mathrm{i0}(x) = J_0(i x) =
\sum_{m=0}^\infty
\frac{1}{m! \Gamma(m+1)} \left(\frac{x}{2}\right)^{2m}
i 0 ( x ) = J 0 ( i x ) = m = 0 ∑ ∞ m ! Γ ( m + 1 ) 1 ( 2 x ) 2 m
const x = tf.tensor1d([0, 1, 2, 3, 4]);
tfspecial.i0(x).print();
Parameters
x
(tf.Tensor|TypedArray|Array)
Computes the modified Bessel function of order one.
Defined as:
i 1 ( x ) = J 1 ( i x ) = ∑ m = 0 ∞ 1 m ! Γ ( m + 2 ) ( x 2 ) 2 m + 1
\mathrm{i1}(x) = J_1(i x) =
\sum_{m=0}^\infty
\frac{1}{m! \Gamma(m+2)} \left(\frac{x}{2}\right)^{2m+1}
i 1 ( x ) = J 1 ( i x ) = m = 0 ∑ ∞ m ! Γ ( m + 2 ) 1 ( 2 x ) 2 m + 1
const x = tf.tensor1d([0, 1, 2, 3, 4]);
tfspecial.i1(x).print();
Parameters
x
(tf.Tensor|TypedArray|Array)
Computes the modified Bessel function of order zero, exponentially scaled.
Defined as:
i 0 e ( x ) = e − ∣ x ∣ J 0 ( i x ) = e − ∣ x ∣ ∑ m = 0 ∞ 1 m ! Γ ( m + 1 ) ( x 2 ) 2 m
\mathrm{i0e}(x) = \mathrm{e}^{-|x|} J_0(i x) =
\mathrm{e}^{-|x|} \sum_{m=0}^\infty
\frac{1}{m! \Gamma(m+1)} \left(\frac{x}{2}\right)^{2m}
i 0 e ( x ) = e − ∣ x ∣ J 0 ( i x ) = e − ∣ x ∣ m = 0 ∑ ∞ m ! Γ ( m + 1 ) 1 ( 2 x ) 2 m
const x = tf.tensor1d([0, 1, 2, 3, 4]);
tfspecial.i0e(x).print();
Parameters
x
(tf.Tensor|TypedArray|Array)
Computes the modified Bessel function of order one, exponentially scaled.
Defined as:
i 1 e ( x ) = e − ∣ x ∣ J 1 ( i x ) = e − ∣ x ∣ ∑ m = 0 ∞ 1 m ! Γ ( m + 2 ) ( x 2 ) 2 m + 1
\mathrm{i1e}(x) = \mathrm{e}^{-|x|} J_1(i x) =
\mathrm{e}^{-|x|} \sum_{m=0}^\infty
\frac{1}{m! \Gamma(m+2)} \left(\frac{x}{2}\right)^{2m+1}
i 1 e ( x ) = e − ∣ x ∣ J 1 ( i x ) = e − ∣ x ∣ m = 0 ∑ ∞ m ! Γ ( m + 2 ) 1 ( 2 x ) 2 m + 1
const x = tf.tensor1d([0, 1, 2, 3, 4]);
tfspecial.i0e(x).print();
Parameters
x
(tf.Tensor|TypedArray|Array)
Computes the ln ( ∣ B ( x ) ∣ ) \ln(|\Beta(\mathbf{x})|) ln ( ∣ B ( x ) ∣ ) , where B ( x ) \Beta(\mathbf{x}) B ( x ) is the
multivariate beta function and x x x is the vector along the last dimention.
Defined as:
l b e t a ( x ) = ln ( ∣ B ( x ) ∣ ) B ( x ) = ∏ i Γ ( x i ) Γ ( ∑ i x i )
\begin{aligned}
\mathrm{lbeta}(\mathbf{x}) &= \ln(|\Beta(\mathbf{x})|) \
\Beta(\mathbf{x}) = \frac{\prod_{i} \Gamma(x_i)}{\Gamma(\sum_{i} x_i)}
\end{aligned}
l b e t a ( x ) B ( x ) = Γ ( ∑ i x i ) ∏ i Γ ( x i ) = ln ( ∣ B ( x ) ∣ )
const x = tf.tensor2d([[1, 1], [2, 2], [3, 3], [4, 4]]);
tfspecial.lbeta(x).print();
Parameters
x
(tf.Tensor|TypedArray|Array)
Compute the regularized incomplete beta integral.
Defined as:
b e t a i n c ( a , b , x ) = I x ( a , b ) = B ( x ; a , b ) B ( a , b ) B ( x ; a , b ) = ∫ 0 x t a − 1 ( 1 − t ) b − 1 d t
\begin{aligned}
\mathrm{betainc}(a, b, x) &= I_x(a, b)
= \frac{\Beta(x; a, b)}{\Beta(a, b)} \
\Beta(x; a, b) &= \int_{0}^{x} t^{a-1} (1-t)^{b-1},dt
\end{aligned}
b e t a i n c ( a , b , x ) B ( x ; a , b ) = I x ( a , b ) = B ( a , b ) B ( x ; a , b ) = ∫ 0 x t a − 1 ( 1 − t ) b − 1 d t
const a = 1;
const b = 2;
const x = tf.tensor1d([0, 0.25, 0.5, 0.75, 1]);
tfspecial.betainc(a, b, x).print();
Parameters
a
(tf.Tensor|TypedArray|Array)
b
(tf.Tensor|TypedArray|Array)
x
(tf.Tensor|TypedArray|Array)
Computes the Gauss error function of x
element-wise.
Defined as:
e r f ( x ) = 2 π ∫ 0 x e − t 2 d t
\mathrm{erf}(x) = \frac{2}{\sqrt{\pi}} \int_{0}^{x} e^{-t^{2}},dt
e r f ( x ) = π 2 ∫ 0 x e − t 2 d t
const x = tf.tensor1d([-1, 0, 1]);
tfspecial.erf(x).print();
Parameters
x
(tf.Tensor|TypedArray|Array)
Computes the Complementary Gauss error function of x
element-wise.
Defined as:
e r f c ( x ) = 2 π ∫ x ∞ e − t 2 d t
\mathrm{erfc}(x) = \frac{2}{\sqrt{\pi}} \int_{x}^{\infty} e^{-t^{2}},dt
e r f c ( x ) = π 2 ∫ x ∞ e − t 2 d t
const x = tf.tensor1d([-1, 0, 1]);
tfspecial.erfc(x).print();
Parameters
x
(tf.Tensor|TypedArray|Array)
Computes the log of the Γ ( x ) \Gamma(x) Γ ( x ) element-wise.
Defined as:
l g a m m a ( x ) = ln ( ∣ Γ ( x ) ∣ ) Γ ( x ) = ∫ 0 ∞ x z − 1 e − x d x
\begin{aligned}
\mathrm{lgamma}(x) &= \ln(|\Gamma(x)|) \
\Gamma(x) &= \int_{0}^{\infty} x^{z-1} e^{-x},dx
\end{aligned}
l g a m m a ( x ) Γ ( x ) = ln ( ∣ Γ ( x ) ∣ ) = ∫ 0 ∞ x z − 1 e − x d x
const x = tf.tensor1d([1, 2, 3, 4]);
tfspecial.lgamma(x).print();
Parameters
x
(tf.Tensor|TypedArray|Array)
First order derivative of ln ( ∣ Γ ( x ) ∣ ) \ln(|\Gamma(x)|) ln ( ∣ Γ ( x ) ∣ ) element-wise.
Defined as:
d i g a m m a ( x ) = ψ ( x ) = d d x ln ( ∣ Γ ( x ) ∣ )
\mathrm{digamma}(x) = \psi(x) = \frac{d}{dx}\ln(|\Gamma(x)|)
d i g a m m a ( x ) = ψ ( x ) = d x d ln ( ∣ Γ ( x ) ∣ )
const x = tf.tensor1d([1, 2, 3, 4]);
tfspecial.digamma(x).print();
Parameters
x
(tf.Tensor|TypedArray|Array)
m + 1
order derivative of ln ( ∣ Γ ( x ) ∣ ) \ln(|\Gamma(x)|) ln ( ∣ Γ ( x ) ∣ ) element-wise.
Defined as:
p o l y g a m m a ( m , x ) = ψ ( m ) ( x ) = d m + 1 d x m + 1 ln ( ∣ Γ ( x ) ∣ )
\mathrm{polygamma}(m, x) = \psi^{(m)}(x)
= \frac{d^{m+1}}{dx^{m+1}}\ln(|\Gamma(x)|)
p o l y g a m m a ( m , x ) = ψ ( m ) ( x ) = d x m + 1 d m + 1 ln ( ∣ Γ ( x ) ∣ )
const m = tf.tensor2d([0, 1, 2, 3], [1, 4]);
const x = tf.tensor2d([1, 2, 3, 4], [4, 1]);
tfspecial.polygamma(m, x).print();
Parameters
m
(tf.Tensor|TypedArray|Array)
x
(tf.Tensor|TypedArray|Array)
The lower regularized incomplete Gamma function.
Defined as:
i g a m m a ( a , x ) = γ ( a , x ) Γ ( a ) γ ( a , x ) = ∫ 0 x t s − 1 e − t d t
\begin{aligned}
\mathrm{igamma}(a, x) &= \frac{\gamma(a, x)}{\Gamma(a)} \
\gamma(a, x) &= \int_{0}^{x} t^{s-1} e^{-t},dt
\end{aligned}
i g a m m a ( a , x ) γ ( a , x ) = Γ ( a ) γ ( a , x ) = ∫ 0 x t s − 1 e − t d t
const a = tf.tensor2d([1, 2, 3, 4], [4, 1]);
const x = tf.tensor2d([1, 2, 5, 10], [1, 4]);
tfspecial.igamma(a, x).print();
Parameters
a
(tf.Tensor|TypedArray|Array)
x
(tf.Tensor|TypedArray|Array)
The upper regularized incomplete Gamma function.
Defined as:
i g a m m a c ( a , x ) = Γ ( a , x ) Γ ( a ) Γ ( a , x ) = ∫ x ∞ t s − 1 e − t d t
\begin{aligned}
\mathrm{igammac}(a, x) &= \frac{\Gamma(a, x)}{\Gamma(a)} \
\Gamma(a, x) &= \int_{x}^{\infty} t^{s-1} e^{-t},dt
\end{aligned}
i g a m m a c ( a , x ) Γ ( a , x ) = Γ ( a ) Γ ( a , x ) = ∫ x ∞ t s − 1 e − t d t
const a = tf.tensor2d([1, 2, 3, 4], [4, 1]);
const x = tf.tensor2d([1, 2, 5, 10], [1, 4]);
tfspecial.igammac(x).print();
Parameters
a
(tf.Tensor|TypedArray|Array)
x
(tf.Tensor|TypedArray|Array)
Compute the Hurwitz zeta function element-wise.
Defined as:
z e t a ( x ) = Z ( x , q ) = ∑ 0 ∞ 1 ( q + n ) x
\mathrm{zeta}(x) = \Zeta(x, q) = \sum_{0}^{\infty} \frac{1}{(q + n)^x}
z e t a ( x ) = Z ( x , q ) = 0 ∑ ∞ ( q + n ) x 1
const x = tf.tensor2d([2, 3, 4, 5], [4, 1]);
const q = tf.tensor2d([1, 2, 3, 4], [1, 4]);
tfspecial.zeta(x, q).print();
Parameters
x
(tf.Tensor|TypedArray|Array)
q
(tf.Tensor|TypedArray|Array)