Class Mimbuild
Provides an implementation of Mimbuild, an algorithm that takes a clustering of variables, each of which is explained by a single latent, then forms the implied covariance matrix over the latent variables, then runs a CPDAG search to in the structure over the latent themselves.
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 class is configured to respect the knowledge of forbidden and required edges, including knowledge of temporal tiers.
- 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
double
Does a Mimbuild search.void
setKnowledge
(Knowledge knowledge) Sets the knowledge to be used in the search.void
setMinClusterSize
(int minClusterSize) void
setPenaltyDiscount
(double penaltyDiscount) Sets the penalty discount of the score used to infer the structure graph.
-
Constructor Details
-
Mimbuild
public Mimbuild()
-
-
Method Details
-
search
public Graph search(List<List<Node>> clustering, List<String> latentNames, ICovarianceMatrix measuresCov) 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.
-
getClustering
Returns the clustering of measured variables, each of which is explained by a single latent.- Returns:
- This clustering.
-
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()- Returns:
- The minimum function (Fgsl) value achieved.
-
getpValue
public double getpValue()- 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. -
setMinClusterSize
public void setMinClusterSize(int minClusterSize)
-