Package edu.cmu.tetrad.search.utils
Class ClusterSignificance
java.lang.Object
edu.cmu.tetrad.search.utils.ClusterSignificance
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumGives the options for checking significance of clusters--could check the significance using a regression model, or could check to see if the cluster is a clique, or could not do the check. -
Constructor Summary
ConstructorsConstructorDescriptionClusterSignificance(List<Node> variables, DataModel dataModel) Constructs a new cluster significance object. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetModelPValue(List<List<Integer>> clusters) Returns the p-value for the given cluster.voidprintClusterPValues(Set<List<Integer>> clusters) Prints the p-values for the given clusters.voidsetCheckType(ClusterSignificance.CheckType checkType) Sets the type of check to perform.booleansignificant(List<Integer> cluster, double alpha) Returns the p-value for the given cluster.variablesForIndices(List<Integer> cluster, List<Node> variables) Converts a list of indices into a list of Nodes representing a cluster.Converts a list of indices into a list of Nodes representing a cluster.
-
Constructor Details
-
ClusterSignificance
Constructs a new cluster significance object.- Parameters:
variables- The variables in the model.dataModel- The data model.
-
-
Method Details
-
variablesForIndices
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.
-
variablesForIndices
public static List<List<Node>> variablesForIndices(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.
-
printClusterPValues
Prints the p-values for the given clusters.- Parameters:
clusters- The clusters.
-
setCheckType
Sets the type of check to perform.- Parameters:
checkType- The type of check.- See Also:
-
significant
Returns the p-value for the given cluster.- Parameters:
cluster- The cluster.alpha- The alpha level.- Returns:
- The p-value.
-
getModelPValue
Returns the p-value for the given cluster.- Parameters:
clusters- The clusters.- Returns:
- The p-value.
-