Package edu.cmu.tetrad.search
Class FasFdr
java.lang.Object
edu.cmu.tetrad.search.FasFdr
- All Implemented Interfaces:
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 does each depth twice, gathering up the p values in the first round, using FDR to estimate a cutoff for acceptance, and rerunning using the specified cutoff.
- Author:
- Joseph Ramsey.
-
Constructor Summary
ConstructorsConstructorDescriptionFasFdr
(IndependenceTest test, int numIndependenceTests, int numDependenceJudgement) Constructs a new FastAdjacencySearch. -
Method Summary
Modifier and TypeMethodDescriptiongetAmbiguousTriples
(Node node) int
getDepth()
long
getNodes()
int
int
boolean
boolean
search()
Discovers all adjacencies in data.void
setDepth
(int depth) void
setKnowledge
(Knowledge knowledge) void
setOut
(PrintStream out) void
setVerbose
(boolean verbose)
-
Constructor Details
-
FasFdr
Constructs a new FastAdjacencySearch.
-
-
Method Details
-
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. -
getDepth
public int getDepth() -
setDepth
public void setDepth(int depth) -
getKnowledge
- Specified by:
getKnowledge
in interfaceIFas
-
setKnowledge
- Specified by:
setKnowledge
in interfaceIFas
-
getNumIndependenceTests
public int getNumIndependenceTests()- Specified by:
getNumIndependenceTests
in interfaceIFas
-
getNumDependenceJudgments
public int getNumDependenceJudgments()- Specified by:
getNumDependenceJudgments
in interfaceIFas
-
getSepsets
- Specified by:
getSepsets
in interfaceIFas
-
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose) - Specified by:
setVerbose
in interfaceIFas
-
isAggressivelyPreventCycles
public boolean isAggressivelyPreventCycles()- Specified by:
isAggressivelyPreventCycles
in interfaceIFas
-
getIndependenceTest
- Specified by:
getIndependenceTest
in interfaceIFas
-
search
-
getElapsedTime
public long getElapsedTime()- Specified by:
getElapsedTime
in interfaceIFas
-
getNodes
-
getAmbiguousTriples
- Specified by:
getAmbiguousTriples
in interfaceIFas
-
setOut
-