Class FasStableConcurrentFdr

java.lang.Object
edu.cmu.tetrad.search.FasStableConcurrentFdr
All Implemented Interfaces:
IFas

public class FasStableConcurrentFdr extends Object implements IFas
Implements the "fast adjacency search" used in several causal algorithm in this package. In the fast adjacency search, at a given stage of the search, an edge X*-*Y is removed from the graph if X _||_ Y | S, where S is a subset of size d either of adj(X) or of adj(Y), where d is the depth of the search. The fast adjacency search performs this procedure for each pair of adjacent edges in the graph and for each depth d = 0, 1, 2, ..., d1, where d1 is either the maximum depth or else the first such depth at which no edges can be removed. The interpretation of this adjacency search is different for different algorithm, depending on the assumptions of the algorithm. A mapping from {x, y} to S({x, y}) is returned for edges x *-* y that have been removed.

This variant uses the PC-Stable modification, calculating independencies in parallel within each depth. It uses a slightly different algorithm from FasStableConcurrent, probably better.

Author:
Joseph Ramsey.
  • Constructor Details

    • FasStableConcurrentFdr

      public FasStableConcurrentFdr(IndependenceTest test)
      Constructs a new FastAdjacencySearch. wd
    • FasStableConcurrentFdr

      public FasStableConcurrentFdr(Graph externalGraph, IndependenceTest test)
      Constructs a new FastAdjacencySearch.
  • Method Details

    • search

      public Graph search()
      Discovers all adjacencies in data. The procedure is to remove edges in the graph which connect pairs of variables which are independent conditional on some other set of variables in the graph (the "sepset"). These are removed in tiers. First, edges which are independent conditional on zero other variables are removed, then edges which are independent conditional on one other variable are removed, then two, then three, and so on, until no more edges can be removed from the graph. The edges which remain in the graph after this procedure are the adjacencies in the data.
      Specified by:
      search in interface IFas
      Returns:
      a SepSet, which indicates which variables are independent conditional on which other variables
    • search

      public Graph search(List<Node> nodes)
      Specified by:
      search in interface IFas
    • getElapsedTime

      public long getElapsedTime()
      Specified by:
      getElapsedTime in interface IFas
    • getDepth

      public int getDepth()
      Specified by:
      getDepth in interface IFas
    • setDepth

      public void setDepth(int depth)
      Specified by:
      setDepth in interface IFas
    • isAggressivelyPreventCycles

      public boolean isAggressivelyPreventCycles()
      Specified by:
      isAggressivelyPreventCycles in interface IFas
    • getIndependenceTest

      public IndependenceTest getIndependenceTest()
      Specified by:
      getIndependenceTest in interface IFas
    • getKnowledge

      public Knowledge getKnowledge()
      Specified by:
      getKnowledge in interface IFas
    • setKnowledge

      public void setKnowledge(Knowledge knowledge)
      Specified by:
      setKnowledge in interface IFas
    • getNumIndependenceTests

      public int getNumIndependenceTests()
      Specified by:
      getNumIndependenceTests in interface IFas
    • getNodes

      public List<Node> getNodes()
      Specified by:
      getNodes in interface IFas
    • getAmbiguousTriples

      public List<Triple> getAmbiguousTriples(Node node)
      Specified by:
      getAmbiguousTriples in interface IFas
    • getSepsets

      public SepsetMap getSepsets()
      Specified by:
      getSepsets in interface IFas
    • setExternalGraph

      public void setExternalGraph(Graph externalGraph)
    • getLogger

      public TetradLogger getLogger()
      The logger, by default the empty logger.
    • setLogger

      public void setLogger(TetradLogger logger)
    • isVerbose

      public boolean isVerbose()
      Specified by:
      isVerbose in interface IFas
    • setVerbose

      public void setVerbose(boolean verbose)
      Specified by:
      setVerbose in interface IFas
    • getNumDependenceJudgments

      public int getNumDependenceJudgments()
      Specified by:
      getNumDependenceJudgments in interface IFas
    • setOut

      public void setOut(PrintStream out)
      Specified by:
      setOut in interface IFas
    • getOut

      public PrintStream getOut()