Table Of Contents
Table Of Contents

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]

Bases: gluonts.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.
  • scale – Scaling parameter.
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.

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 tranformation (computed by the f method) and the inverse transformation (f_inv).

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.

sign

Return the sign of the Jacobian’s determinant.

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

Bases: gluonts.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.
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.

sign

Return the sign of the Jacobian’s determinant.