gluonts.torch.distributions.generalized_pareto 模块#

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

基类:torch.distributions.distribution.Distribution

广义帕累托分布。

参数
  • xi – 包含 xi(尾部权重)形状参数的张量。张量的形状为 (*batch_shape, 1)

  • beta – 包含 beta 尺度参数的张量。张量的形状为 (*batch_shape, 1)

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

张量 x 的 CDF 值,形状为 (*batch_shape)

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

张量分位数值的 ICDF 值,形状为 (*batch_shape)

log_prob(x)[source]#

张量 x 的对数概率,形状为 (*batch_shape)

property mean#

返回分布的均值,形状为 (*batch_shape,)

property stddev#

返回分布的标准差。

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

返回分布的方差,形状为 (*batch_shape,)

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

基类:gluonts.torch.distributions.distribution_output.DistributionOutput

distr_cls#

gluonts.torch.distributions.generalized_pareto.GeneralizedPareto 的别名

distribution(distr_args, loc: Optional[torch.Tensor] = None, scale: Optional[torch.Tensor] = None) gluonts.torch.distributions.generalized_pareto.GeneralizedPareto[source]#

根据构造函数参数集合和可选的尺度张量,构造关联的分布。

参数
  • distr_args – 底层 Distribution 类型的构造函数参数。

  • loc – 可选张量,形状与结果分布的 batch_shape+event_shape 相同。

  • scale – 可选张量,形状与结果分布的 batch_shape+event_shape 相同。

classmethod domain_map(xi: torch.Tensor, beta: torch.Tensor) Tuple[torch.Tensor, torch.Tensor][source]#

将参数转换为正确的形状和域。

域取决于分布的类型,而正确的形状是通过重塑尾随轴获得的,以便返回的张量定义具有正确 event_shape 的分布。

property event_shape: Tuple#

与输出对象兼容的每个独立事件的形状。