Package edu.cmu.tetrad.search
Class LvSwap
java.lang.Object
edu.cmu.tetrad.search.LvSwap
- All Implemented Interfaces:
GraphSearch
Does BOSS2, followed by two swap rules, then final FCI orientation.
Definitions
A(z, x, y, w) iff z*->xinvalid input: '<'-*y*-*w invalid input: '&' ~adj(z, y) invalid input: '&' ~adj(z, w) invalid input: '&' maybe adj(x, w)
B(z, x, y, w) iff z*-*x*->yinvalid input: '<'-*w invalid input: '&' ~adj(z, y) invalid input: '&' ~adj(z, w) invalid input: '&' ~adj(x, w)
BOSS2(π, score) is the permutation π‘ returned by BOSS2 for input permutation π
DAG(π, score) is the DAG built by BOSS (using Grow-Shrink) for permutation π
swap(x, y, π) is the permutation obtained from π by swapping x and y
Procedure LV-SWAP(π, score)
G1, π’ invalid input: '<'- DAG(BOSS2(π, score))
G2 invalid input: '<'- Keep only unshielded colliders in G1, turn all tails into circles
Find all invalid input: '<'z, x, y, w> that satisfy A(z, x, y, w) in DAG(π‘, score) and B(z, x, y’, w) for some y’, in DAG(swap(x, y, π‘), score)
Orient all such x*->y’invalid input: '<'-*w in G2
Add all such w*-*x to set S
Remove all edges in S from G2.
G3 invalid input: '<'- Keep only unshielded colliders in G2, making all other endpoints circles.
G4 invalid input: '<'- finalOrient(G3)
Full ruleset.
DDP tail orientation only.
Return PAG G4
- Author:
- jdramsey
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlvswap1()
lvswap2a()
lvswap2b()
lvswap3()
static void
retainArrows
(Graph graph) static void
retainColliders
(Graph graph) static void
retainUnshieldedColliders
(Graph graph) search()
void
setAlgType
(LvSwap.AlgType bossAlgType) void
setBossAlgType
(Boss.AlgType algType) void
setCompleteRuleSetUsed
(boolean completeRuleSetUsed) void
setCovarianceMatrix
(ICovarianceMatrix covarianceMatrix) void
setDepth
(int depth) void
setDoDefiniteDiscriminatingPathTailRule
(boolean doDiscriminatingPathTailRule) void
setKnowledge
(Knowledge knowledge) void
setMaxPathLength
(int maxPathLength) void
setNumStarts
(int numStarts) void
setOut
(PrintStream out) void
setTest
(IndependenceTest test) void
setUseDataOrder
(boolean useDataOrder) void
setUseRaskuttiUhler
(boolean useRaskuttiUhler) void
setUseScore
(boolean useScore) void
setVerbose
(boolean verbose)
-
Constructor Details
-
LvSwap
-
-
Method Details
-
search
- Specified by:
search
in interfaceGraphSearch
-
lvswap1
-
lvswap2a
-
lvswap2b
-
lvswap3
-
retainUnshieldedColliders
-
retainColliders
-
retainArrows
-
setCompleteRuleSetUsed
public void setCompleteRuleSetUsed(boolean completeRuleSetUsed) - Parameters:
completeRuleSetUsed
- set to true if Zhang's complete rule set should be used, false if only R1-R4 (the rule set of the original FCI) should be used. False by default.
-
setMaxPathLength
public void setMaxPathLength(int maxPathLength) - Parameters:
maxPathLength
- the maximum length of any discriminating path, or -1 if unlimited.
-
setTest
-
setCovarianceMatrix
-
setNumStarts
public void setNumStarts(int numStarts) -
setDepth
public void setDepth(int depth) -
setUseRaskuttiUhler
public void setUseRaskuttiUhler(boolean useRaskuttiUhler) -
setUseScore
public void setUseScore(boolean useScore) -
setUseDataOrder
public void setUseDataOrder(boolean useDataOrder) -
setKnowledge
-
setVerbose
public void setVerbose(boolean verbose) -
setOut
-
setAlgType
-
setBossAlgType
-
setDoDefiniteDiscriminatingPathTailRule
public void setDoDefiniteDiscriminatingPathTailRule(boolean doDiscriminatingPathTailRule)
-