gluonts.torch.distributions.generalized_pareto module#

class gluonts.torch.distributions.generalized_pareto.GeneralizedPareto(xi, beta, validate_args=None)[source]#

Bases: Distribution

Generalised Pareto distribution.

Parameters:
  • xi – Tensor containing the xi (heaviness) shape parameters. The tensor is of shape (*batch_shape, 1)

  • beta – Tensor containing the beta scale parameters. The tensor is of shape (*batch_shape, 1)

arg_constraints = {'beta': GreaterThan(lower_bound=0.0), 'xi': GreaterThan(lower_bound=0.0)}#
cdf(x)[source]#

cdf values for a tensor x of shape (*batch_shape)

has_rsample = False#
icdf(value)[source]#

icdf values for a tensor quantile values of shape (*batch_shape)

log_prob(x)[source]#

Log probability for a tensor x of shape (*batch_shape)

property mean#

Returns the mean of the distribution, of shape (*batch_shape,)

property stddev#

Returns the standard deviation of the distribution.

support = GreaterThan(lower_bound=0.0)#
property variance#

Returns the variance of the distribution, of shape (*batch_shape,)

class gluonts.torch.distributions.generalized_pareto.GeneralizedParetoOutput[source]#

Bases: DistributionOutput

distr_cls#

alias of GeneralizedPareto

distribution(distr_args, loc: Optional[Tensor] = None, scale: Optional[Tensor] = None) GeneralizedPareto[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.

classmethod domain_map(xi: Tensor, beta: Tensor) Tuple[Tensor, Tensor][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_shape: Tuple#

Shape of each individual event compatible with the output object.