Documentation of 'smile.stat.distribution.DiscreteMixture' Java class
DiscreteMixture
smile.stat.distribution

Class DiscreteMixture

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  DiscreteMixture.Component
      A component in the mixture distribution is defined by a distribution and its weight in the mixture.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double bic(double[] data)
      BIC score of the mixture for given data.
      double cdf(double x)
      Cumulative distribution function.
      double entropy()
      Shannon entropy.
      java.util.List<DiscreteMixture.Component> getComponents()
      Returns the list of components in the mixture.
      double logp(int x)
      The probability mass function in log scale.
      double mean()
      The mean of distribution.
      int npara()
      The number of parameters of the distribution.
      double p(int x)
      The probability mass function.
      double quantile(double p)
      The quantile, the probability to the left of quantile is p.
      double rand()
      Generates a random number following this distribution.
      double sd()
      The standard deviation of distribution.
      int size()
      Returns the number of components in the mixture.
      java.lang.String toString() 
      double var()
      The variance of distribution.
      • Methods inherited from class java.lang.Object

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

      • DiscreteMixture

        public DiscreteMixture(java.util.List<DiscreteMixture.Component> mixture)
        Constructor.
        Parameters:
        mixture - a list of discrete distributions.
    • Method Detail

      • mean

        public double mean()
        Description copied from interface: Distribution
        The mean of distribution.
      • var

        public double var()
        Description copied from interface: Distribution
        The variance of distribution.
      • sd

        public double sd()
        Description copied from interface: Distribution
        The standard deviation of distribution.
      • entropy

        public double entropy()
        Shannon entropy. Not supported.
      • cdf

        public double cdf(double x)
        Description copied from interface: Distribution
        Cumulative distribution function. That is the probability to the left of x.
      • rand

        public double rand()
        Description copied from interface: Distribution
        Generates a random number following this distribution.
      • quantile

        public double quantile(double p)
        Description copied from interface: Distribution
        The quantile, the probability to the left of quantile is p. It is actually the inverse of cdf.
      • npara

        public int npara()
        Description copied from interface: Distribution
        The number of parameters of the distribution.
      • size

        public int size()
        Returns the number of components in the mixture.
      • bic

        public double bic(double[] data)
        BIC score of the mixture for given data.
      • getComponents

        public java.util.List<DiscreteMixture.Component> getComponents()
        Returns the list of components in the mixture.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.