Table Of Contents
Table Of Contents

gluonts.distribution.distribution_output module

class gluonts.distribution.distribution_output.ArgProj(args_dim: Dict[str, int], domain_map: Callable[..., Tuple[Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]]], dtype: gluonts.core.component.DType = <class 'numpy.float32'>, prefix: Optional[str] = None, **kwargs)[source]

Bases: mxnet.gluon.block.HybridBlock

A block that can be used to project from a dense layer to distribution arguments.

  • dim_args – Dictionary with string key and int value dimension of each arguments that will be passed to the domain map, the names are used as parameters prefix.
  • domain_map – Function returning a tuple containing one tensor a function or a HybridBlock. This will be called with num_args arguments and should return a tuple of outputs that will be used when calling the distribution constructor.
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.
class gluonts.distribution.distribution_output.DistributionOutput[source]

Bases: gluonts.distribution.distribution_output.Output

Class to construct a distribution given the output of a network.

distribution(distr_args, scale: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol, None] = None) → gluonts.distribution.distribution.Distribution[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.
  • scale – Optional tensor, of the same shape as the batch_shape+event_shape of the resulting distribution.
domain_map(F, *args)[source]

Converts arguments to the right shape and domain. The domain depends on the type of distribution, while the correct shape is obtained by reshaping the trailing axis in such a way that the returned tensors define a distribution of the right event_shape.


Number of event dimensions, i.e., length of the event_shape tuple, of the distributions that this object constructs.


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

class gluonts.distribution.distribution_output.Output[source]

Bases: object

Class to connect a network to some output

domain_map(F, *args)[source]
get_args_proj(prefix: Optional[str] = None) → gluonts.distribution.distribution_output.ArgProj[source]