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

Class UniformDiscrete

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


    public class UniformDiscrete
    extends DiscreteDistribution
    The discrete uniform distribution.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      UniformDiscrete()
      Creates a new Uniform distribution with a min of 0 and a max of 10
      UniformDiscrete(int min, int max)
      Creates a new discrete uniform 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.
      DiscreteDistribution clone() 
      int getMax() 
      int getMin() 
      double invCdf(double p)
      Computes the inverse Cumulative Density Function (CDF-1) at the given point.
      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 median()
      Computes the median 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) 
      void setMax(int max)
      Sets the maximum value to occur from the distribution, must be greater than getMin().
      void setMin(int min)
      Sets the minimum value to occur from the distribution, must be less than getMax().
      void setMinMax(int min, int max)
      Sets the minimum and maximum values at the same time, this is useful if setting them one at a time may have caused a conflict with the previous values
      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

      • UniformDiscrete

        public UniformDiscrete()
        Creates a new Uniform distribution with a min of 0 and a max of 10
      • UniformDiscrete

        public UniformDiscrete(int min,
                               int max)
        Creates a new discrete uniform distribution
        Parameters:
        min - the minimum value to occur
        max - the maximum value to occur
    • Method Detail

      • setMinMax

        public void setMinMax(int min,
                              int max)
        Sets the minimum and maximum values at the same time, this is useful if setting them one at a time may have caused a conflict with the previous values
        Parameters:
        min - the new minimum value to occur
        max - the new maximum value to occur
      • setMin

        public void setMin(int min)
        Sets the minimum value to occur from the distribution, must be less than getMax().
        Parameters:
        min - the minimum value to occur
      • getMin

        public int getMin()
      • setMax

        public void setMax(int max)
        Sets the maximum value to occur from the distribution, must be greater than getMin().
        Parameters:
        max - the maximum value to occur
      • getMax

        public int getMax()
      • 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)
      • 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 DiscreteDistribution
        Parameters:
        p - the probability value
        Returns:
        the value such that the CDF would return p
      • 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
      • median

        public double median()
        Description copied from class: Distribution
        Computes the median value of the distribution
        Overrides:
        median in class Distribution
        Returns:
        the median 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.