gluonts.mx.distribution.bijection module¶
-
class
gluonts.mx.distribution.bijection.
AffineTransformation
(loc: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol, None] = None, scale: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol, None] = None)[source]¶ Bases:
gluonts.mx.distribution.bijection.Bijection
An affine transformation consisting of a scaling and a translation.
If translation is specified loc, and the scaling by scale, then this transformation computes y = scale * x + loc, where all operations are element-wise.
- Parameters
loc – Translation parameter. If unspecified or None, this will be zero.
scale – Scaling parameter. If unspecified or None, this will be one.
-
property
event_dim
¶
-
f
(x: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol][source]¶ Forward transformation x -> y
-
f_inv
(y: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol][source]¶ Inverse transformation y -> x
-
log_abs_det_jac
(x: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], y: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol][source]¶ Receives (x, y) and returns log of the absolute value of the Jacobian determinant
\[\log |dy/dx|\]Note that this is the Jacobian determinant of the forward transformation x -> y.
-
property
sign
¶ Return the sign of the Jacobian’s determinant.
-
class
gluonts.mx.distribution.bijection.
Bijection
[source]¶ Bases:
object
A bijective transformation.
This is defined through the forward transformation (computed by the f method) and the inverse transformation (f_inv).
-
property
event_dim
¶
-
f
(x: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol][source]¶ Forward transformation x -> y
-
f_inv
(y: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol][source]¶ Inverse transformation y -> x
-
inverse_bijection
() → gluonts.mx.distribution.bijection.Bijection[source]¶ Returns a Bijection instance that represents the inverse of this transformation.
-
log_abs_det_jac
(x: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], y: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol][source]¶ Receives (x, y) and returns log of the absolute value of the Jacobian determinant
\[\log |dy/dx|\]Note that this is the Jacobian determinant of the forward transformation x -> y.
-
property
sign
¶ Return the sign of the Jacobian’s determinant.
-
property
-
class
gluonts.mx.distribution.bijection.
InverseBijection
(bijection: gluonts.mx.distribution.bijection.Bijection)[source]¶ Bases:
gluonts.mx.distribution.bijection.Bijection
The inverse of a given transformation.
This is a wrapper around bijective transformations, that inverts the role of f and f_inv, and modifies other related methods accordingly.
- Parameters
bijection – The transformation to invert.
-
property
event_dim
¶
-
f
(x: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol][source]¶ Forward transformation x -> y
-
f_inv
(y: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol][source]¶ Inverse transformation y -> x
-
inverse_bijection
() → gluonts.mx.distribution.bijection.Bijection[source]¶ Returns a Bijection instance that represents the inverse of this transformation.
-
log_abs_det_jac
(x: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], y: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol][source]¶ Receives (x, y) and returns log of the absolute value of the Jacobian determinant
\[\log |dy/dx|\]Note that this is the Jacobian determinant of the forward transformation x -> y.
-
property
sign
¶ Return the sign of the Jacobian’s determinant.