gluonts.torch.distributions.spliced_binned_pareto module#
- class gluonts.torch.distributions.spliced_binned_pareto.SplicedBinnedPareto(bins_lower_bound: float, bins_upper_bound: float, logits: torch.Tensor, upper_gp_xi: torch.Tensor, upper_gp_beta: torch.Tensor, lower_gp_xi: torch.Tensor, lower_gp_beta: torch.Tensor, numb_bins: int = 100, tail_percentile_gen_pareto: float = 0.05, validate_args=None)[source]#
Bases:
gluonts.torch.distributions.binned_uniforms.BinnedUniforms
Spliced Binned-Pareto univariate distribution.
- Parameters
bins_lower_bound (The lower bound of the bin edges) –
bins_upper_bound (The upper bound of the bin edges) –
numb_bins (The number of equidistance bins to allocate between) – bins_lower_bound and bins_upper_bound. Default value is 100.
tail_percentile_gen_pareto (The percentile of the distribution that is) – each tail. Default value is 0.05. NB: This symmetric percentile can still represent asymmetric upper and lower tails.
- arg_constraints = {'logits': Real(), 'lower_gp_beta': GreaterThan(lower_bound=0.0), 'lower_gp_xi': GreaterThan(lower_bound=0.0), 'upper_gp_beta': GreaterThan(lower_bound=0.0), 'upper_gp_xi': GreaterThan(lower_bound=0.0)}#
- cdf(x: torch.Tensor)[source]#
Cumulative density tensor for a tensor of data points x.
‘x’ is expected to be of shape (*batch_shape)
- has_rsample = False#
- log_prob(x: torch.Tensor, for_training=True)[source]#
- Parameters
x (a tensor of size 'batch_size', 1) –
for_training (boolean to indicate a return of the log-probability, or) – of the loss (which is an adjusted log-probability)
- support = Real()#
- class gluonts.torch.distributions.spliced_binned_pareto.SplicedBinnedParetoOutput(bins_lower_bound: float, bins_upper_bound: float, num_bins: int, tail_percentile_gen_pareto: float)[source]#
Bases:
gluonts.torch.distributions.distribution_output.DistributionOutput
- distr_cls#
alias of
gluonts.torch.distributions.spliced_binned_pareto.SplicedBinnedPareto
- distribution(distr_args, loc: Optional[torch.Tensor] = None, scale: Optional[torch.Tensor] = None) gluonts.torch.distributions.binned_uniforms.BinnedUniforms [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(logits: torch.Tensor, upper_gp_xi: torch.Tensor, upper_gp_beta: torch.Tensor, lower_gp_xi: torch.Tensor, lower_gp_beta: torch.Tensor) Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.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.