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 voidretainArrows(Graph graph) static voidretainColliders(Graph graph) static voidretainUnshieldedColliders(Graph graph) search()voidsetAlgType(LvSwap.AlgType bossAlgType) voidsetBossAlgType(Boss.AlgType algType) voidsetCompleteRuleSetUsed(boolean completeRuleSetUsed) voidsetCovarianceMatrix(ICovarianceMatrix covarianceMatrix) voidsetDepth(int depth) voidsetDoDefiniteDiscriminatingPathTailRule(boolean doDiscriminatingPathTailRule) voidsetKnowledge(Knowledge knowledge) voidsetMaxPathLength(int maxPathLength) voidsetNumStarts(int numStarts) voidsetOut(PrintStream out) voidsetTest(IndependenceTest test) voidsetUseDataOrder(boolean useDataOrder) voidsetUseRaskuttiUhler(boolean useRaskuttiUhler) voidsetUseScore(boolean useScore) voidsetVerbose(boolean verbose)
-
Constructor Details
-
LvSwap
-
-
Method Details
-
search
- Specified by:
searchin 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)
-