gluonts.mx.distribution.inflated_beta module#

class gluonts.mx.distribution.inflated_beta.OneInflatedBeta(alpha: Union[NDArray, Symbol], beta: Union[NDArray, Symbol], one_probability: Union[NDArray, Symbol])[source]#

Bases: ZeroAndOneInflatedBeta

One Inflated Beta distribution as in Raydonal Ospina, Silvia L.P. Ferrari: Inflated Beta Distributions.

Parameters:
  • alpha – Tensor containing the alpha shape parameters, of shape (*batch_shape, *event_shape).

  • beta – Tensor containing the beta shape parameters, of shape (*batch_shape, *event_shape).

  • one_probability – Tensor containing the probability of ones, of shape (*batch_shape, *event_shape).

  • F

arg_names: Tuple#
is_reparameterizable = False#
class gluonts.mx.distribution.inflated_beta.OneInflatedBetaOutput[source]#

Bases: ZeroInflatedBetaOutput

args_dim: Dict[str, int] = {'alpha': 1, 'beta': 1, 'one_probability': 1}#
distr_cls#

alias of OneInflatedBeta

classmethod domain_map(F, alpha, beta, one_probability)[source]#

Maps raw tensors to valid arguments for constructing a ZeroInflatedBeta distribution.

Parameters:
  • F

  • alpha – Tensor of shape (*batch_shape, 1)

  • beta – Tensor of shape (*batch_shape, 1)

  • zero_probability – Tensor of shape (*batch_shape, 1)

Returns:

Three squeezed tensors, of shape (*batch_shape): First two have entries mapped to the positive orthant, last is mapped to (0,1)

Return type:

Tuple[Tensor, Tensor, Tensor]

class gluonts.mx.distribution.inflated_beta.ZeroAndOneInflatedBeta(alpha: Union[NDArray, Symbol], beta: Union[NDArray, Symbol], zero_probability: Union[NDArray, Symbol], one_probability: Union[NDArray, Symbol])[source]#

Bases: MixtureDistribution

Zero And One Inflated Beta distribution as in Raydonal Ospina, Silvia L.P. Ferrari: Inflated Beta Distributions

Parameters:
  • alpha – Tensor containing the alpha shape parameters, of shape (*batch_shape, *event_shape).

  • beta – Tensor containing the beta shape parameters, of shape (*batch_shape, *event_shape).

  • zero_probability – Tensor containing the probability of zeros, of shape (*batch_shape, *event_shape).

  • one_probability – Tensor containing the probability of ones, of shape (*batch_shape, *event_shape).

  • F

arg_names: Tuple#
is_reparameterizable = False#
log_prob(x: Union[NDArray, Symbol]) Union[NDArray, 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

class gluonts.mx.distribution.inflated_beta.ZeroAndOneInflatedBetaOutput[source]#

Bases: DistributionOutput

args_dim: Dict[str, int] = {'alpha': 1, 'beta': 1, 'one_probability': 1, 'zero_probability': 1}#
distr_cls#

alias of ZeroAndOneInflatedBeta

classmethod domain_map(F, alpha, beta, zero_probability, one_probability)[source]#

Maps raw tensors to valid arguments for constructing a ZeroAndOneInflatedBeta distribution.

Parameters:
  • F

  • alpha – Tensor of shape (*batch_shape, 1)

  • beta – Tensor of shape (*batch_shape, 1)

  • zero_probability – Tensor of shape (*batch_shape, 1)

Returns:

Four squeezed tensors, of shape (*batch_shape): First two have entries mapped to the positive orthant, zero_probability is mapped to (0, 1), one_probability is mapped to (0, 1-zero_probability)

Return type:

Tuple[Tensor, Tensor, Tensor, Tensor]

property event_shape: Tuple#

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

property value_in_support: float#

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.

class gluonts.mx.distribution.inflated_beta.ZeroInflatedBeta(alpha: Union[NDArray, Symbol], beta: Union[NDArray, Symbol], zero_probability: Union[NDArray, Symbol])[source]#

Bases: ZeroAndOneInflatedBeta

Zero Inflated Beta distribution as in Raydonal Ospina, Silvia L.P. Ferrari: Inflated Beta Distributions.

Parameters:
  • alpha – Tensor containing the alpha shape parameters, of shape (*batch_shape, *event_shape).

  • beta – Tensor containing the beta shape parameters, of shape (*batch_shape, *event_shape).

  • zero_probability – Tensor containing the probability of zeros, of shape (*batch_shape, *event_shape).

  • F

arg_names: Tuple#
is_reparameterizable = False#
class gluonts.mx.distribution.inflated_beta.ZeroInflatedBetaOutput[source]#

Bases: ZeroAndOneInflatedBetaOutput

args_dim: Dict[str, int] = {'alpha': 1, 'beta': 1, 'zero_probability': 1}#
distr_cls#

alias of ZeroInflatedBeta

classmethod domain_map(F, alpha, beta, zero_probability)[source]#

Maps raw tensors to valid arguments for constructing a ZeroInflatedBeta distribution.

Parameters:
  • F

  • alpha – Tensor of shape (*batch_shape, 1)

  • beta – Tensor of shape (*batch_shape, 1)

  • zero_probability – Tensor of shape (*batch_shape, 1)

Returns:

Three squeezed tensors, of shape (*batch_shape): First two have entries mapped to the positive orthant, last is mapped to (0,1)

Return type:

Tuple[Tensor, Tensor, Tensor]