# gluonts.distribution.bijection module¶

class gluonts.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]

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.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.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.

class gluonts.distribution.bijection.InverseBijection(bijection: gluonts.distribution.bijection.Bijection)[source]

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.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.