Package edu.cmu.tetrad.search
Class MimbuildTrek
java.lang.Object
edu.cmu.tetrad.search.MimbuildTrek
Implements Mimbuild using the theory of treks and ranks.
This class is configured to respect knowledge of forbidden and required edges, including knowledge of temporal tiers.
- Version:
- $Id: $Id
- Author:
- adambrodie
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe clustering used.The full graph discovered.The covariance matrix over the latents that is implied by the clustering.int
Clusters smaller than this size will be tossed out.double
The p-value of the model.Does the search and returns the graph.void
setAlpha
(double alpha) The alpha to use.void
setEpsilon
(double epsilon) Sets the parameter convergence threshold.void
setKnowledge
(Knowledge knowledge) The knowledge to use in the search.void
setMinClusterSize
(int minClusterSize) Sets the minimum cluster size.
-
Constructor Details
-
MimbuildTrek
public MimbuildTrek()Empty constructor.
-
-
Method Details
-
search
public Graph search(List<List<Node>> clustering, List<String> latentNames, ICovarianceMatrix measuresCov) throws InterruptedException Does the search and returns the graph.- Parameters:
clustering
- A clustering of the variables, each of which is explained by a single latent.latentNames
- The names of the latents, which cannot be known by the clustering algorithm.measuresCov
- The covariance matrix over the measured variables, from the data.- Returns:
- A graph over the latents.
- Throws:
InterruptedException
-
getClustering
-
setAlpha
public void setAlpha(double alpha) The alpha to use.- Parameters:
alpha
- This alpha.
-
setKnowledge
The knowledge to use in the search.- Parameters:
knowledge
- This knowledge.
-
getLatentsCov
The covariance matrix over the latents that is implied by the clustering.- Returns:
- This covariance matrix.
-
getpValue
public double getpValue()The p-value of the model.- Returns:
- This p-value.
-
getFullGraph
The full graph discovered.- Returns:
- the allowUnfaithfulness discovered graph, with latents and indicators.
-
setEpsilon
public void setEpsilon(double epsilon) Sets the parameter convergence threshold. Default = 1e-4.- Parameters:
epsilon
- This threshold.
-
getMinClusterSize
public int getMinClusterSize()Clusters smaller than this size will be tossed out.- Returns:
- a int
-
setMinClusterSize
public void setMinClusterSize(int minClusterSize) Sets the minimum cluster size.- Parameters:
minClusterSize
- The minimum cluster size to be set.- Throws:
IllegalArgumentException
- If the minimum cluster size is less than 3.
-