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

Class Poisson

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable


    public class Poisson
    extends DiscreteDistribution
    The Poisson distribution is for the number of events occurring in a fixed amount of time, where the event has an average rate and all other occurrences are independent.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      Poisson()
      Creates a new Poisson distribution with λ = 1
      Poisson(double lambda)
      Creates a new Poisson distribution
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double cdf(int x)
      Computes the value of the Cumulative Density Function (CDF) at the given point.
      Poisson clone() 
      double getLambda() 
      double logPmf(int x)
      Computes the log of the Probability Mass Function.
      double max()
      The maximum value for which the #pdf(double) is meant to return a value.
      double mean()
      Computes the mean value of the distribution
      double min()
      The minimum value for which the #pdf(double) is meant to return a value.
      double mode()
      Computes the mode of the distribution.
      double pmf(int x) 
      double[] sample(int numSamples, java.util.Random rand)
      This method returns a double array containing the values of random samples from this distribution.
      void setLambda(double lambda)
      Sets the average rate of the event occurring in a unit of time
      double skewness()
      Computes the skewness of the distribution.
      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

      • Poisson

        public Poisson()
        Creates a new Poisson distribution with λ = 1
      • Poisson

        public Poisson(double lambda)
        Creates a new Poisson distribution
        Parameters:
        lambda - the average rate of the event
    • Method Detail

      • setLambda

        public void setLambda(double lambda)
        Sets the average rate of the event occurring in a unit of time
        Parameters:
        lambda - the average rate of the event occurring
      • getLambda

        public double getLambda()
        Returns:
        the average rate of the event occurring in a unit of time
      • logPmf

        public double logPmf(int x)
        Description copied from class: DiscreteDistribution
        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.
        Overrides:
        logPmf in class DiscreteDistribution
        Parameters:
        x - the value to get the log(PMF) of
        Returns:
        the value of log(PMF(x))
      • cdf

        public double cdf(int x)
        Description copied from class: DiscreteDistribution
        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 DiscreteDistribution
        Parameters:
        x - the value to get the CDF of
        Returns:
        the CDF(x)
      • sample

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

        public double mean()
        Description copied from class: Distribution
        Computes the mean value of the distribution
        Specified by:
        mean in class Distribution
        Returns:
        the mean value of the distribution
      • mode

        public double mode()
        Description copied from class: Distribution
        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.
        Specified by:
        mode in class Distribution
        Returns:
        the mode of the distribution
      • variance

        public double variance()
        Description copied from class: Distribution
        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.
        Specified by:
        variance in class Distribution
        Returns:
        the variance of the distribution.
      • skewness

        public double skewness()
        Description copied from class: Distribution
        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.
        Specified by:
        skewness in class Distribution
        Returns:
        the skewness of the distribution.
      • min

        public double min()
        Description copied from class: Distribution
        The minimum value for which the #pdf(double) is meant to return a value. Note that Double.NEGATIVE_INFINITY is a valid return value.
        Specified by:
        min in class Distribution
        Returns:
        the minimum value for which the #pdf(double) is meant to return a value.
      • max

        public double max()
        Description copied from class: Distribution
        The maximum value for which the #pdf(double) is meant to return a value. Note that Double.POSITIVE_INFINITY is a valid return value.
        Specified by:
        max in class Distribution
        Returns:
        the maximum value for which the #pdf(double) is meant to return a value.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.