gluonts.mx.representation.embedding module

class gluonts.mx.representation.embedding.Embedding(num_bins: int, size: Optional[int] = None, *args, **kwargs)[source]

Bases: gluonts.mx.representation.representation.Representation

A class representing an embedding operation on top of a given binning. Note that this representation is intended to applied on top of categorical/binned data.

Parameters
hybrid_forward(F, data: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], observed_indicator: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], scale: Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol, None], rep_params: List[Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]], **kwargs) → Tuple[Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol], List[Union[mxnet.ndarray.ndarray.NDArray, mxnet.symbol.symbol.Symbol]]][source]

Transform the data into the desired representation.

Parameters
  • F

  • data – Target data.

  • observed_indicator – Target observed indicator.

  • scale – Pre-computed scale.

  • rep_params – Additional pre-computed representation parameters.

  • **kwargs, – Additional block-specfic parameters.

Returns

Tuple consisting of the transformed data, the computed scale, and additional parameters to be passed to post_transform.

Return type

Tuple[Tensor, Tensor, List[Tensor]]