Skip to content

Commit

Permalink
renamed to Exponentiated Generalised Pareto
Browse files Browse the repository at this point in the history
  • Loading branch information
kashif committed Sep 13, 2024
1 parent e2c2962 commit a638d17
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/gluonts/torch/distributions/spliced_binned_pareto.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@
from .distribution_output import DistributionOutput


class GeneralizedPareto(Distribution):
class ExGeneralizedPareto(Distribution):
r"""
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)
Exponentiated 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 = {
Expand All @@ -55,13 +55,13 @@ def __init__(self, xi, beta, validate_args=None):
setattr(self, "xi", xi)
setattr(self, "beta", beta)

super(GeneralizedPareto, self).__init__()
super(ExGeneralizedPareto, self).__init__()

if isinstance(xi, Number) and isinstance(beta, Number):
batch_shape = torch.Size()
else:
batch_shape = self.xi.size()
super(GeneralizedPareto, self).__init__(
super(ExGeneralizedPareto, self).__init__(
batch_shape, validate_args=validate_args
)

Expand Down Expand Up @@ -194,13 +194,13 @@ def __init__(

self.lower_gp_xi = lower_gp_xi
self.lower_gp_beta = lower_gp_beta
self.lower_gen_pareto = GeneralizedPareto(
self.lower_gen_pareto = ExGeneralizedPareto(
self.lower_gp_xi, self.lower_gp_beta
)

self.upper_gp_xi = upper_gp_xi
self.upper_gp_beta = upper_gp_beta
self.upper_gen_pareto = GeneralizedPareto(
self.upper_gen_pareto = ExGeneralizedPareto(
self.upper_gp_xi, self.upper_gp_beta
)

Expand Down

0 comments on commit a638d17

Please sign in to comment.