Class DiscreteExponentialFamilyMixture

All Implemented Interfaces:
Serializable, Distribution

public class DiscreteExponentialFamilyMixture extends DiscreteMixture
The finite mixture of distributions from discrete exponential family. The EM algorithm is provided to learn the mixture model from data.
See Also:
  • Field Details

    • L

      public final double L
      The log-likelihood when the distribution is fit on a sample data.
    • bic

      public final double bic
      The BIC score when the distribution is fit on a sample data.
  • Constructor Details

    • DiscreteExponentialFamilyMixture

      public DiscreteExponentialFamilyMixture(DiscreteMixture.Component... mixture)
      Constructor.
      Parameters:
      mixture - a list of discrete exponential family distributions.
  • Method Details

    • fit

      public static DiscreteExponentialFamilyMixture fit(int[] x, DiscreteMixture.Component... components)
      Fits the mixture model with the EM algorithm.
      Parameters:
      x - the training data.
      components - the initial configuration of mixture. Components may have different distribution form.
      Returns:
      the distribution.
    • fit

      public static DiscreteExponentialFamilyMixture fit(int[] x, DiscreteMixture.Component[] components, double gamma, int maxIter, double tol)
      Fits the mixture model with the EM algorithm.
      Parameters:
      x - the training data.
      components - the initial configuration.
      gamma - the regularization parameter.
      maxIter - the maximum number of iterations.
      tol - the tolerance of convergence test.
      Returns:
      the distribution.