gluonts.mx.distribution.distribution_output module¶
-
class
gluonts.mx.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.
- Parameters
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], **kwargs) → 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.distribution_output.
DistributionOutput
[source]¶ Bases:
gluonts.mx.distribution.distribution_output.Output
Class to construct a distribution given the output of a network.
-
distr_cls
: type = None¶
-
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) → gluonts.mx.distribution.distribution.Distribution[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.
-
domain_map
(F, *args: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol])[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.
-
property
event_dim
¶ Number of event dimensions, i.e., length of the event_shape tuple, of the distributions that this object constructs.
-
property
event_shape
¶ Shape of each individual event contemplated by the distributions that this object constructs.
-
property
value_in_support
¶ A float that will have a valid numeric value when computing the log-loss of the corresponding distribution. By default 0.0. This value will be used when padding data series.
-