Class Mimbuild
Specifically, the search will first infer the covariance matrix over the latents and then will use the GRaSP algorithm (see) to infer the structure graph over the latents, using the SEM Bic score with the given penalty discount (default 2).
One may wish to obtain the implied correlation matrix over the latents and run one's own choice of CPDAG algorithm on it with one's own test or score; a method is available to return this covariance matrix.
A suitable clustering for Mimbuild may be obtained using the BPC or FOFC algorithm (see).
This algorithm is described in Spirtes et al., Causation, Prediction, and Search.
This class is configured to respect the knowledge of forbidden and required edges, including knowledge of temporal tiers.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the clustering of measured variables, each of which is explained by a single latent.The full graph inferred, including the edges from latents to measures.Returns the inferred covariance matrix over the latent variables.int
jf Clusters smaller than this size will be tossed out.double
Getter for the fieldminimum
.double
Getter for the fieldpValue
.Does a Mimbuild search.void
setKnowledge
(Knowledge knowledge) Sets the knowledge to be used in the search.void
setMinClusterSize
(int minClusterSize) Setter for the fieldminClusterSize
.void
setPenaltyDiscount
(double penaltyDiscount) Sets the penalty discount of the score used to infer the structure graph.void
setSeed
(long seed) Setter for the fieldseed
.
-
Constructor Details
-
Mimbuild
public Mimbuild()Constructs a new Mimbuild search.
-
-
Method Details
-
search
public Graph search(List<List<Node>> clustering, List<String> latentNames, ICovarianceMatrix measuresCov) throws InterruptedException Does a Mimbuild search.- Parameters:
clustering
- The clustering to use--this clusters the measured variables in such a way that each cluster is explained by a single latent variables.latentNames
- The names of the latent variables corresponding in order ot each cluster in the clustering.measuresCov
- The covariance matrix over the measured variables.- Returns:
- The inferred graph over the latent variables.
- Throws:
InterruptedException
-
getClustering
-
setKnowledge
Sets the knowledge to be used in the search.- Parameters:
knowledge
- This knowledge.
-
getLatentsCov
Returns the inferred covariance matrix over the latent variables.- Returns:
- This covariance matrix.
-
getMinimum
public double getMinimum()Getter for the field
minimum
.- Returns:
- The minimum function (Fgsl) value achieved.
-
getpValue
public double getpValue()Getter for the field
pValue
.- Returns:
- The p value of the optimization.
-
getFullGraph
The full graph inferred, including the edges from latents to measures. And all fo the edges inferred among latents.- Returns:
- This full graph.
-
setPenaltyDiscount
public void setPenaltyDiscount(double penaltyDiscount) Sets the penalty discount of the score used to infer the structure graph.- Parameters:
penaltyDiscount
- The penalty discount.
-
getMinClusterSize
public int getMinClusterSize()jf Clusters smaller than this size will be tossed out.- Returns:
- a int
-
setMinClusterSize
public void setMinClusterSize(int minClusterSize) Setter for the field
minClusterSize
.- Parameters:
minClusterSize
- a int
-
setSeed
public void setSeed(long seed) Setter for the field
seed
.- Parameters:
seed
- a long
-