Class GeneralizedParetoDistribution

  • All Implemented Interfaces:
    Distribution

    public class GeneralizedParetoDistribution
    extends java.lang.Object
    implements Distribution
    Generalized Pareto Distribution (GPD), popular for modeling long tail distributions.
    Since:
    0.7.0
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) double mu
      Parameters (location, scale, shape)
      (package private) double sigma
      Parameters (location, scale, shape)
      (package private) double xi
      Parameters (location, scale, shape)
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double cdf​(double val)
      Return the cumulative density function at the given value.
      static double cdf​(double val, double mu, double sigma, double xi)
      CDF of GPD distribution
      double getMu()
      Location parameter
      double getSigma()
      Scale parameter
      double getXi()
      Shape parameter
      double logpdf​(double x)
      Return the log density of an existing value
      static double logpdf​(double x, double mu, double sigma, double xi)
      PDF of GPD distribution
      double pdf​(double x)
      Return the density of an existing value
      static double pdf​(double x, double mu, double sigma, double xi)
      PDF of GPD distribution
      double quantile​(double val)
      Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
      static double quantile​(double val, double mu, double sigma, double xi)
      Quantile function of GPD distribution
      java.lang.String toString()
      Describe the distribution
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • mu

        final double mu
        Parameters (location, scale, shape)
      • sigma

        final double sigma
        Parameters (location, scale, shape)
      • xi

        final double xi
        Parameters (location, scale, shape)
    • Constructor Detail

      • GeneralizedParetoDistribution

        public GeneralizedParetoDistribution​(double mu,
                                             double sigma,
                                             double xi)
        Constructor.
        Parameters:
        mu - Location parameter mu
        sigma - Scale parameter sigma
        xi - Shape parameter xi (= -kappa)
    • Method Detail

      • getMu

        public double getMu()
        Location parameter
        Returns:
        Location
      • getSigma

        public double getSigma()
        Scale parameter
        Returns:
        Sigma
      • getXi

        public double getXi()
        Shape parameter
        Returns:
        xi
      • pdf

        public static double pdf​(double x,
                                 double mu,
                                 double sigma,
                                 double xi)
        PDF of GPD distribution
        Parameters:
        x - Value
        mu - Location parameter mu
        sigma - Scale parameter sigma
        xi - Shape parameter xi (= -kappa)
        Returns:
        PDF at position x.
      • pdf

        public double pdf​(double x)
        Description copied from interface: Distribution
        Return the density of an existing value
        Specified by:
        pdf in interface Distribution
        Parameters:
        x - existing value
        Returns:
        distribution density
      • logpdf

        public static double logpdf​(double x,
                                    double mu,
                                    double sigma,
                                    double xi)
        PDF of GPD distribution
        Parameters:
        x - Value
        mu - Location parameter mu
        sigma - Scale parameter sigma
        xi - Shape parameter xi (= -kappa)
        Returns:
        PDF at position x.
      • logpdf

        public double logpdf​(double x)
        Description copied from interface: Distribution
        Return the log density of an existing value
        Specified by:
        logpdf in interface Distribution
        Parameters:
        x - existing value
        Returns:
        log distribution density
      • cdf

        public static double cdf​(double val,
                                 double mu,
                                 double sigma,
                                 double xi)
        CDF of GPD distribution
        Parameters:
        val - Value
        mu - Location parameter mu
        sigma - Scale parameter sigma
        xi - Shape parameter xi (= -kappa)
        Returns:
        CDF at position x.
      • cdf

        public double cdf​(double val)
        Description copied from interface: Distribution
        Return the cumulative density function at the given value.
        Specified by:
        cdf in interface Distribution
        Parameters:
        val - existing value
        Returns:
        cumulative density
      • quantile

        public static double quantile​(double val,
                                      double mu,
                                      double sigma,
                                      double xi)
        Quantile function of GPD distribution
        Parameters:
        val - Value
        mu - Location parameter mu
        sigma - Scale parameter sigma
        xi - Shape parameter xi (= -kappa)
        Returns:
        Quantile function at position x.
      • quantile

        public double quantile​(double val)
        Description copied from interface: Distribution
        Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
        Specified by:
        quantile in interface Distribution
        Parameters:
        val - Quantile to find
        Returns:
        Quantile position
      • toString

        public java.lang.String toString()
        Description copied from interface: Distribution
        Describe the distribution
        Specified by:
        toString in interface Distribution
        Overrides:
        toString in class java.lang.Object
        Returns:
        description