class Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], distribution:, F=None)[source]


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

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


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


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

Return type


property nan_prob
class, 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.

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

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




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) →[source]

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

  • 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) →[source]