Class PooledAdjacencySearch
java.lang.Object
edu.cmu.tetrad.search.PooledAdjacencySearch
Estimates a common adjacency (skeleton) structure across multiple datasets sharing the
same variables. This is the shared adjacency stage of the multi-dataset FASK
algorithms (FASK-Pool and FASK-Vote); the caller supplies standardized datasets and
receives an undirected graph whose edges are the estimated adjacencies.
Methods:
PooledAdjacencySearch.Method.IMAGES: BOSS on the score averaged across datasets (the classical IMaGES adjacency stage; assumes acyclicity).PooledAdjacencySearch.Method.POOLED_FAS: stable FAS with a composite test that combines per-dataset Fisher Z p-values by Fisher's method.PooledAdjacencySearch.Method.MG_FAS: the pooled moral graph (full-order partial correlations, Fisher-combined across datasets, Bonferroni over pairs), pruned by FAS-style sepset tests restricted to moral neighborhoods. For linear SEMs with independent errors -- cyclic or not -- the precision support is the moral graph (adjacencies plus common-child pairs), so this method is cycle-safe; CI-based pruning cannot remove Richardson-style virtual adjacencies, which cap its precision around cycles.PooledAdjacencySearch.Method.MG_LING: the pooled moral graph filtered by per-dataset ICA (LiNG) estimates of B, pooled by the median across datasets of max(|B_ij|, |B_ji|), thresholded. Requires non-Gaussian errors; with Gaussian errors ICA is unidentified and this degenerates toward the moral graph.PooledAdjacencySearch.Method.MG_FAS_INTERSECT_LING: the intersection of MG_FAS and MG_LING. Both tend to full recall inside the moral graph with different false positives, so the intersection trades little recall for precision. Best for skewed (FASK-appropriate) data; use MG_FAS when errors may be Gaussian.PooledAdjacencySearch.Method.IMAGES_RESTRICT_MG_FAS: IMaGES restricted to the MG_FAS skeleton, which is imposed as a superstructure by forbidding both directions of every pair outside it. A DAG-based score search on cyclic data adds adjacencies to compensate for the cycles it cannot represent, many of them moralized pairs, which is exactly what MG_FAS prunes; restricting the search to that skeleton keeps the moral-graph method's precision while letting the score decide which of its adjacencies survive. Output adjacencies are a subset of MG_FAS's, so recall cannot exceed MG_FAS's.
Background knowledge is passed to the IMaGES and pooled-FAS stages; the moral-graph stages do not consult knowledge (required and forbidden edges are for the caller's orientation stage to enforce).
- Author:
- josephramsey
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow the common adjacency structure is estimated. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs the search with the given score wrapper (used only by the IMAGES method; may be null for the other methods). -
Method Summary
Modifier and TypeMethodDescriptionsearch(List<DataSet> standardized, Parameters parameters) Estimates the common adjacency structure over the given standardized datasets, discarding any orientations the method produces.searchWithOrientations(List<DataSet> standardized, Parameters parameters) Estimates the common adjacency structure over the given standardized datasets, retaining whatever orientations the method produces.voidsetFasAlpha(double fasAlpha) Sets the alpha level for the FAS-style tests.voidsetFasDepth(int fasDepth) Sets the depth of the FAS-style searches (-1 for unlimited; capped at 4 in MG_FAS).voidsetFastIcaA(double fastIcaA) Sets the FastICA tanh nonlinearity parameter for the LiNG stage.voidsetFastIcaMaxIter(int fastIcaMaxIter) Sets the FastICA maximum iterations for the LiNG stage.voidsetFastIcaTolerance(double fastIcaTolerance) Sets the FastICA convergence tolerance for the LiNG stage.voidsetKnowledge(Knowledge knowledge) Sets background knowledge, passed to the IMaGES and pooled-FAS stages.voidsetLingThreshold(double lingThreshold) Sets the threshold on the pooled absolute LiNG B-hat entries.voidSets the adjacency method.static DataSetstandardize(DataSet dataSet) Standardizes a data set for the pooled FASK algorithms: each continuous variable to mean zero and unit variance; discrete variables left as they are, as discrete variables, so that a score for mixed data can still be computed from the result.
-
Constructor Details
-
PooledAdjacencySearch
Constructs the search with the given score wrapper (used only by the IMAGES method; may be null for the other methods).- Parameters:
score- the score wrapper for IMaGES
-
-
Method Details
-
search
Estimates the common adjacency structure over the given standardized datasets, discarding any orientations the method produces.- Parameters:
standardized- the standardized datasets, sharing variable namesparameters- search parameters (passed through to the IMaGES stage)- Returns:
- an undirected graph over the first dataset's variables whose edges are the estimated adjacencies
- Throws:
InterruptedException- if an underlying search is interrupted
-
searchWithOrientations
public Graph searchWithOrientations(List<DataSet> standardized, Parameters parameters) throws InterruptedException Estimates the common adjacency structure over the given standardized datasets, retaining whatever orientations the method produces. OnlyPooledAdjacencySearch.Method.IMAGESproduces any: the CPDAG of the BOSS search over the averaged score, whose compelled orientations are score-based evidence about direction. The other methods return undirected graphs, so for them this is the same assearch(List, Parameters).- Parameters:
standardized- the standardized datasets, sharing variable namesparameters- search parameters (passed through to the IMaGES stage)- Returns:
- a graph over the first dataset's variables whose edges are the estimated adjacencies, directed where the method compels a direction
- Throws:
InterruptedException- if an underlying search is interrupted
-
standardize
Standardizes a data set for the pooled FASK algorithms: each continuous variable to mean zero and unit variance; discrete variables left as they are, as discrete variables, so that a score for mixed data can still be computed from the result.- Parameters:
dataSet- the data set- Returns:
- the standardized data set
-
setKnowledge
Sets background knowledge, passed to the IMaGES and pooled-FAS stages.- Parameters:
knowledge- the knowledge; not null
-
setMethod
Sets the adjacency method. Default: IMAGES.- Parameters:
method- the method
-
setFasAlpha
public void setFasAlpha(double fasAlpha) Sets the alpha level for the FAS-style tests. Default: 0.05.- Parameters:
fasAlpha- the alpha level, in (0, 1)
-
setFasDepth
public void setFasDepth(int fasDepth) Sets the depth of the FAS-style searches (-1 for unlimited; capped at 4 in MG_FAS). Default: -1.- Parameters:
fasDepth- the depth
-
setLingThreshold
public void setLingThreshold(double lingThreshold) Sets the threshold on the pooled absolute LiNG B-hat entries. Default: 0.1.- Parameters:
lingThreshold- the threshold, nonnegative
-
setFastIcaMaxIter
public void setFastIcaMaxIter(int fastIcaMaxIter) Sets the FastICA maximum iterations for the LiNG stage. Default: 2000.- Parameters:
fastIcaMaxIter- maximum iterations, positive
-
setFastIcaTolerance
public void setFastIcaTolerance(double fastIcaTolerance) Sets the FastICA convergence tolerance for the LiNG stage. Default: 1e-6.- Parameters:
fastIcaTolerance- the tolerance, positive
-
setFastIcaA
public void setFastIcaA(double fastIcaA) Sets the FastICA tanh nonlinearity parameter for the LiNG stage. Default: 1.1.- Parameters:
fastIcaA- the parameter
-