Class MixtureModel

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

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

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    int[]
    Getter for the field cases.
    double[][]
    Getter for the field data.
    getDemixedData.
    int
    getDistribution(int caseNum)
    Classifies a given case into a model, based on which model has the highest gamma value for that case.
    double[][]
    getMeans.
    getVariances.
    double[]
    getWeights.
    double[]
    Perform an FGES search on each of the demixed data sets.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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()

      Getter for the field data.

      Returns:
      the mixed data set in array form
    • getMeans

      public double[][] getMeans()

      getMeans.

      Returns:
      the means matrix
    • getWeights

      public double[] getWeights()

      getWeights.

      Returns:
      the weights array
    • getVariances

      public Matrix[] getVariances()

      getVariances.

      Returns:
      the variance matrix
    • getCases

      public int[] getCases()

      Getter for the field cases.

      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.
      Parameters:
      caseNum - a int
      Returns:
      a int
    • getDemixedData

      public DataSet[] getDemixedData()

      getDemixedData.

      Returns:
      an array of DataSet objects
    • 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.