Documentation of 'jsat.distributions.discrete.DiscreteDistribution' Java class
DiscreteDistribution
jsat.distributions.discrete

Class DiscreteDistribution

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable
    Direct Known Subclasses:
    Binomial, Poisson, UniformDiscrete, Zipf


    public abstract class DiscreteDistribution
    extends Distribution
    This abstract class defines the contract for a distribution over the integer values.

    The cdf(double) method will behave by rounding down and then calling the integer cdf(int) counterpart.
    See Also:
    Serialized Form
    • Constructor Detail

      • DiscreteDistribution

        public DiscreteDistribution()
    • Method Detail

      • logPmf

        public double logPmf(int x)
        Computes the log of the Probability Mass Function. Note, that then the probability is zero, Double.NEGATIVE_INFINITY would be the true value. Instead, this method will always return the negative of Double.MAX_VALUE. This is to avoid propagating bad values through computation.
        Parameters:
        x - the value to get the log(PMF) of
        Returns:
        the value of log(PMF(x))
      • pmf

        public abstract double pmf(int x)
      • cdf

        public abstract double cdf(int 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)
      • cdf

        public double cdf(double x)
        Description copied from class: Distribution
        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.
        Specified by:
        cdf in class Distribution
        Parameters:
        x - the value to get the CDF of
        Returns:
        the CDF(x)
      • invCdf

        public double invCdf(double p)
        Description copied from class: Distribution
        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
        Overrides:
        invCdf in class Distribution
        Parameters:
        p - the probability value
        Returns:
        the value such that the CDF would return p

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.