Class ClusterSignificance

java.lang.Object
edu.cmu.tetrad.search.utils.ClusterSignificance

public class ClusterSignificance extends Object

Provides some methods to check significance of clusters for clustering algroithms. It is assumed that for each cluster there is a single latent that is a parent of all the nodes in the cluster. Significance of these models is returned.

Version:
$Id: $Id
Author:
josephramsey
  • Constructor Details

    • ClusterSignificance

      public ClusterSignificance(List<Node> variables, DataModel dataModel)
      Constructs a new cluster significance object.
      Parameters:
      variables - The variables in the model.
      dataModel - The data model.
  • Method Details

    • variablesForIndices

      public static List<Node> variablesForIndices(List<Integer> cluster, List<Node> variables)
      Converts a list of indices into a list of Nodes representing a cluster.
      Parameters:
      cluster - The indices of the variables.
      variables - The variables.
      Returns:
      The extracted node list.
    • variablesForIndices2

      public static List<List<Node>> variablesForIndices2(Set<List<Integer>> clusters, List<Node> _variables)
      Converts a list of indices into a list of Nodes representing a cluster.
      Parameters:
      clusters - The indices of the variables.
      _variables - The variables.
      Returns:
      The extracted node list.
    • getInts

      public static List<Integer> getInts(int[] indices)
      Converts a list of indices into a list of Integers representing a cluster.
      Parameters:
      indices - The indices of the variables.
      Returns:
      The extracted index list.
    • printClusterPValues

      public void printClusterPValues(Set<List<Integer>> clusters)
      Prints the p-values for the given clusters.
      Parameters:
      clusters - The clusters.
    • setCheckType

      public void setCheckType(ClusterSignificance.CheckType checkType)
      Sets the type of check to perform.
      Parameters:
      checkType - The type of check.
      See Also:
    • significant

      public boolean significant(List<Integer> cluster, double alpha)
      Returns the p-value for the given cluster.
      Parameters:
      cluster - The cluster.
      alpha - The alpha level.
      Returns:
      The p-value.
    • getModelPValue

      public double getModelPValue(List<List<Integer>> clusters)
      Returns the p-value for the given cluster.
      Parameters:
      clusters - The clusters.
      Returns:
      The p-value.