Class MixtureModel

java.lang.Object
edu.cmu.tetrad.search.MixtureModel

public class MixtureModel extends Object
Represents a Gaussian mixture model -- a dataset with data sampled from two or more multivariate Gaussian distributions.
Author:
Madelyn Glymour
  • Constructor Details

    • MixtureModel

      public MixtureModel(DataSet data, double[][] dataArray, double[][] meansArray, double[] weightsArray, Matrix[] variancesArray, double[][] gammaArray)
      Constructs a mixture model from a mixed data set, a means matrix, a weights array, a variance matrix, and a gamma matrix.
      Parameters:
      data - the mixed data set
      dataArray - the mixed data set in array form
      meansArray - the means matrix
      weightsArray - the weights array
      variancesArray - the variance matrix
      gammaArray - the gamma matrix
  • Method Details

    • getData

      public double[][] getData()
      Returns:
      the mixed data set in array form
    • getMeans

      public double[][] getMeans()
      Returns:
      the means matrix
    • getWeights

      public double[] getWeights()
      Returns:
      the weights array
    • getVariances

      public Matrix[] getVariances()
      Returns:
      the variance matrix
    • getCases

      public int[] getCases()
      Returns:
      an array assigning each case an integer corresponding to a model
    • getDistribution

      public int getDistribution(int caseNum)
      Classifies a given case into a model, based on which model has the highest gamma value for that case.
    • getDemixedData

      public DataSet[] getDemixedData()
    • searchDemixedData

      public double[] searchDemixedData()
      Perform an FGES search on each of the demixed data sets.
      Returns:
      the BIC scores of the graphs returned by searches.