Class GaussianMixture

All Implemented Interfaces:
Serializable, Distribution

public class GaussianMixture extends ExponentialFamilyMixture
Finite univariate Gaussian mixture. The EM algorithm is provided to learn the mixture model from data. BIC score is employed to estimate the number of components.
See Also:
  • Constructor Details

    • GaussianMixture

      public GaussianMixture(Mixture.Component... components)
      Constructor.
      Parameters:
      components - a list of multivariate Gaussian distributions.
  • Method Details

    • fit

      public static GaussianMixture fit(int k, double[] x)
      Fits the Gaussian mixture model with the EM algorithm.
      Parameters:
      k - the number of components.
      x - the training data.
      Returns:
      the distribution.
    • fit

      public static GaussianMixture fit(double[] x)
      Fits the Gaussian mixture model with the EM algorithm. The number of components will be selected by BIC.
      Parameters:
      x - the training data.
      Returns:
      the distribution.