gluonts.mx.distribution.nan_mixture module

class gluonts.mx.distribution.nan_mixture.NanMixture(nan_prob: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], distribution: gluonts.mx.distribution.distribution.Distribution, F=None)[source]

Bases: gluonts.mx.distribution.mixture.MixtureDistribution

A mixture distribution of a NaN-valued Deterministic distribution and Distribution

Parameters
  • nan_prob – A tensor of the probabilities of missing values. The entries should all be positive and smaller than 1. All axis should either coincide with the ones from the component distributions, or be 1 (in which case, the NaN probability is shared across the axis).

  • distribution – A Distribution object representing the Distribution of non-NaN values. Distributions can be of different types. Each component’s support should be made of tensors of shape (…, d).

  • F – A module that can either refer to the Symbol API or the NDArray API in MXNet

arg_names = None
property distribution
is_reparameterizable = False
log_prob(x: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol][source]

Compute the log-density of the distribution at x.

Parameters

x – Tensor of shape (*batch_shape, *event_shape).

Returns

Tensor of shape batch_shape containing the log-density of the distribution for each event in x.

Return type

Tensor

property nan_prob
class gluonts.mx.distribution.nan_mixture.NanMixtureArgs(distr_output: gluonts.mx.distribution.distribution_output.DistributionOutput, prefix: Optional[str] = None)[source]

Bases: mxnet.gluon.block.HybridBlock

hybrid_forward(F, x: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]) → Tuple[Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], ...][source]

Overrides to construct symbolic graph for this Block.

Parameters
  • x (Symbol or NDArray) – The first input tensor.

  • *args (list of Symbol or list of NDArray) – Additional input tensors.

class gluonts.mx.distribution.nan_mixture.NanMixtureOutput(distr_output: gluonts.mx.distribution.distribution_output.DistributionOutput)[source]

Bases: gluonts.mx.distribution.distribution_output.DistributionOutput

distr_cls

alias of NanMixture

distribution(distr_args, loc: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol, None] = None, scale: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol, None] = None, **kwargs) → gluonts.mx.distribution.mixture.MixtureDistribution[source]

Construct the associated distribution, given the collection of constructor arguments and, optionally, a scale tensor.

Parameters
  • distr_args – Constructor arguments for the underlying Distribution type.

  • loc – Optional tensor, of the same shape as the batch_shape+event_shape of the resulting distribution.

  • scale – Optional tensor, of the same shape as the batch_shape+event_shape of the resulting distribution.

property event_shape

Shape of each individual event contemplated by the distributions that this object constructs.

get_args_proj(prefix: Optional[str] = None) → gluonts.mx.distribution.nan_mixture.NanMixtureArgs[source]