Class Mimbuild
Specifically, the search will first infer the covariance matrix over the latents and then will use the BOSS 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.getFullGraph(List<Node> includeNodes) The full graph inferred, including the edges from latents to measures.Returns the inferred covariance matrix over the latent variables.doubleGetter for the fieldminimum.doubleReturns the p-value associated with the resulting statistical test or computation.Conducts a search to infer a graph over latent variables based on the provided clustering, measure names, latent variable names, and measures covariance.Does a Mimbuild search.voidsetPenaltyDiscount(double penaltyDiscount) Sets the penalty discount of the score used to infer the structure graph.
-
Constructor Details
-
Mimbuild
public Mimbuild()Constructs a new Mimbuild search.
-
-
Method Details
-
search
public Graph search(int[][] clustering, String[] measureNames, String[] latentNames, double[][] measuresCov) throws InterruptedException Conducts a search to infer a graph over latent variables based on the provided clustering, measure names, latent variable names, and measures covariance.- Parameters:
clustering- An array where each subarray represents a cluster of measured variables, with each index corresponding to the position of a measure in the measureNames array. Each cluster is assumed to be explained by a single latent variable. The clusters must be disjoint.measureNames- An array of names corresponding to the measured variables.latentNames- An array of names for the latent variables, where each name corresponds to a cluster in the clustering parameter.measuresCov- A two-dimensional double array representing the covariance matrix over the measured variables.- Returns:
- A graph inferred over the latent variables, depicting relationships among measured and latent variables.
- Throws:
InterruptedException- If the search process is interrupted.IllegalArgumentException- If the clustering contains invalid indices or overlapping clusters.NullPointerException- If any of the arguments are null.
-
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. The clusters must be disjoint.latentNames- The names of the latent variables corresponding in order ot each cluster in the clustering. These must be unique.measurescov- The covariance matrix over the measured variables.- Returns:
- The inferred structure graph over the latent variables.
- Throws:
InterruptedException- If the search is interrupted.
-
getClustering
Returns the clustering of measured variables, each of which is explained by a single latent.- Returns:
- This clustering.
-
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()Returns the p-value associated with the resulting statistical test or computation. The p-value helps to determine the statistical significance of the result.- Returns:
- The p-value as a double.
-
getFullGraph
The full graph inferred, including the edges from latents to measures. And all fo the edges inferred among latents.- Parameters:
includeNodes- The nodes to include.- 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.
-