Class PooledAdjacencySearch

java.lang.Object
edu.cmu.tetrad.search.PooledAdjacencySearch

public class PooledAdjacencySearch extends Object
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 Classes
    Modifier and Type
    Class
    Description
    static enum 
    How the common adjacency structure is estimated.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs the search with the given score wrapper (used only by the IMAGES method; may be null for the other methods).
  • Method Summary

    Modifier and Type
    Method
    Description
    search(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.
    void
    setFasAlpha(double fasAlpha)
    Sets the alpha level for the FAS-style tests.
    void
    setFasDepth(int fasDepth)
    Sets the depth of the FAS-style searches (-1 for unlimited; capped at 4 in MG_FAS).
    void
    setFastIcaA(double fastIcaA)
    Sets the FastICA tanh nonlinearity parameter for the LiNG stage.
    void
    setFastIcaMaxIter(int fastIcaMaxIter)
    Sets the FastICA maximum iterations for the LiNG stage.
    void
    setFastIcaTolerance(double fastIcaTolerance)
    Sets the FastICA convergence tolerance for the LiNG stage.
    void
    Sets background knowledge, passed to the IMaGES and pooled-FAS stages.
    void
    setLingThreshold(double lingThreshold)
    Sets the threshold on the pooled absolute LiNG B-hat entries.
    void
    Sets the adjacency method.
    static 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.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PooledAdjacencySearch

      public PooledAdjacencySearch(ScoreWrapper score)
      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

      public Graph search(List<DataSet> standardized, Parameters parameters) throws InterruptedException
      Estimates the common adjacency structure over the given standardized datasets, discarding any orientations the method produces.
      Parameters:
      standardized - the standardized datasets, sharing variable names
      parameters - 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. Only PooledAdjacencySearch.Method.IMAGES produces 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 as search(List, Parameters).
      Parameters:
      standardized - the standardized datasets, sharing variable names
      parameters - 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

      public static DataSet standardize(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.
      Parameters:
      dataSet - the data set
      Returns:
      the standardized data set
    • setKnowledge

      public void setKnowledge(Knowledge knowledge)
      Sets background knowledge, passed to the IMaGES and pooled-FAS stages.
      Parameters:
      knowledge - the knowledge; not null
    • setMethod

      public void setMethod(PooledAdjacencySearch.Method method)
      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