Documentation of 'jsat.distributions.Distribution' Java class
Distribution
jsat.distributions

Class Distribution

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable
    Direct Known Subclasses:
    ContinuousDistribution, DiscreteDistribution


    public abstract class Distribution
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.Serializable
    Base distribution class for distributions that have only one input.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      Distribution() 
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      abstract double cdf(double x)
      Computes the value of the Cumulative Density Function (CDF) at the given point.
      abstract Distribution clone() 
      double invCdf(double p)
      Computes the inverse Cumulative Density Function (CDF-1) at the given point.
      abstract double max()
      The maximum value for which the #pdf(double) is meant to return a value.
      abstract double mean()
      Computes the mean value of the distribution
      double median()
      Computes the median value of the distribution
      abstract double min()
      The minimum value for which the #pdf(double) is meant to return a value.
      abstract double mode()
      Computes the mode of the distribution.
      double[] sample(int numSamples, java.util.Random rand)
      This method returns a double array containing the values of random samples from this distribution.
      DenseVector sampleVec(int numSamples, java.util.Random rand)
      This method returns a double array containing the values of random samples from this distribution.
      abstract double skewness()
      Computes the skewness of the distribution.
      double standardDeviation()
      Computes the standard deviation of the distribution.
      abstract double variance()
      Computes the variance of the distribution.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Distribution

        public Distribution()
    • Method Detail

      • cdf

        public abstract double cdf(double x)
        Computes the value of the Cumulative Density Function (CDF) at the given point. The CDF returns a value in the range [0, 1], indicating what portion of values occur at or below that point.
        Parameters:
        x - the value to get the CDF of
        Returns:
        the CDF(x)
      • invCdf

        public double invCdf(double p)
        Computes the inverse Cumulative Density Function (CDF-1) at the given point. It takes in a value in the range of [0, 1] and returns the value x, such that CDF(x) = p
        Parameters:
        p - the probability value
        Returns:
        the value such that the CDF would return p
      • mean

        public abstract double mean()
        Computes the mean value of the distribution
        Returns:
        the mean value of the distribution
      • median

        public double median()
        Computes the median value of the distribution
        Returns:
        the median value of the distribution
      • mode

        public abstract double mode()
        Computes the mode of the distribution. Not all distributions have a mode for all parameter values. NaN may be returned if the mode is not defined for the current values of the distribution.
        Returns:
        the mode of the distribution
      • variance

        public abstract double variance()
        Computes the variance of the distribution. Not all distributions have a finite variance for all parameter values. NaN may be returned if the variance is not defined for the current values of the distribution. Infinity is a possible value to be returned by some distributions.
        Returns:
        the variance of the distribution.
      • skewness

        public abstract double skewness()
        Computes the skewness of the distribution. Not all distributions have a finite skewness for all parameter values. NaN may be returned if the skewness is not defined for the current values of the distribution.
        Returns:
        the skewness of the distribution.
      • standardDeviation

        public double standardDeviation()
        Computes the standard deviation of the distribution. Not all distributions have a finite standard deviation for all parameter values. NaN may be returned if the variance is not defined for the current values of the distribution. Infinity is a possible value to be returned by some distributions.
        Returns:
        the standard deviation of the distribution
      • min

        public abstract double min()
        The minimum value for which the #pdf(double) is meant to return a value. Note that Double.NEGATIVE_INFINITY is a valid return value.
        Returns:
        the minimum value for which the #pdf(double) is meant to return a value.
      • max

        public abstract double max()
        The maximum value for which the #pdf(double) is meant to return a value. Note that Double.POSITIVE_INFINITY is a valid return value.
        Returns:
        the maximum value for which the #pdf(double) is meant to return a value.
      • sample

        public double[] sample(int numSamples,
                               java.util.Random rand)
        This method returns a double array containing the values of random samples from this distribution.
        Parameters:
        numSamples - the number of random samples to take
        rand - the source of randomness
        Returns:
        an array of the random sample values
      • sampleVec

        public DenseVector sampleVec(int numSamples,
                                     java.util.Random rand)
        This method returns a double array containing the values of random samples from this distribution.
        Parameters:
        numSamples - the number of random samples to take
        rand - the source of randomness
        Returns:
        a vector of the random sample values
      • clone

        public abstract Distribution clone()
        Overrides:
        clone in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.