Class LogisticDistribution

  • All Implemented Interfaces:
    Distribution

    @Alias("log")
    public class LogisticDistribution
    extends java.lang.Object
    implements Distribution
    Logistic distribution.
    Since:
    0.6.0
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) double location
      Parameters: location and scale
      (package private) double scale
      Parameters: location and scale
    • Constructor Summary

      Constructors 
      Constructor Description
      LogisticDistribution​(double location, double scale)
      Constructor.
    • 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 loc, double scale)
      Cumulative density function.
      double getLocation()
      Get the location aparameter.
      double getScale()
      Get the scale parameter.
      static double logcdf​(double val, double loc, double scale)
      log Cumulative density function.
      double logpdf​(double val)
      Return the log density of an existing value
      static double logpdf​(double val, double loc, double scale)
      log Probability density function.
      static double logquantile​(double val, double loc, double scale)
      log Quantile function.
      double nextRandom​(java.util.Random random)
      Generate a new random value
      double pdf​(double val)
      Return the density of an existing value
      static double pdf​(double val, double loc, double scale)
      Probability density function.
      double quantile​(double val)
      Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
      static double quantile​(double val, double loc, double scale)
      Quantile function.
      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

      • location

        double location
        Parameters: location and scale
      • scale

        double scale
        Parameters: location and scale
    • Constructor Detail

      • LogisticDistribution

        public LogisticDistribution​(double location,
                                    double scale)
        Constructor.
        Parameters:
        location - Location
        scale - Scale
    • Method Detail

      • getLocation

        public double getLocation()
        Get the location aparameter.
        Returns:
        location
      • getScale

        public double getScale()
        Get the scale parameter.
        Returns:
        scale
      • pdf

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

        public static double pdf​(double val,
                                 double loc,
                                 double scale)
        Probability density function.
        Parameters:
        val - Value
        loc - Location
        scale - Scale
        Returns:
        PDF
      • logpdf

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

        public static double logpdf​(double val,
                                    double loc,
                                    double scale)
        log Probability density function.
        Parameters:
        val - Value
        loc - Location
        scale - Scale
        Returns:
        log PDF
      • 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
      • cdf

        public static double cdf​(double val,
                                 double loc,
                                 double scale)
        Cumulative density function.
        Parameters:
        val - Value
        loc - Location
        scale - Scale
        Returns:
        CDF
      • logcdf

        public static double logcdf​(double val,
                                    double loc,
                                    double scale)
        log Cumulative density function. TODO: untested.
        Parameters:
        val - Value
        loc - Location
        scale - Scale
        Returns:
        log PDF
      • quantile

        public static double quantile​(double val,
                                      double loc,
                                      double scale)
        Quantile function.
        Parameters:
        val - Value
        loc - Location
        scale - Scale
        Returns:
        Quantile
      • logquantile

        public static double logquantile​(double val,
                                         double loc,
                                         double scale)
        log Quantile function. TODO: untested.
        Parameters:
        val - Value
        loc - Location
        scale - Scale
        Returns:
        Quantile
      • 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
      • nextRandom

        public double nextRandom​(java.util.Random random)
        Description copied from interface: Distribution
        Generate a new random value
        Specified by:
        nextRandom in interface Distribution
        Parameters:
        random - Random number generator
        Returns:
        new random value
      • 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