Package edu.cmu.tetrad.search.utils
Class DagSepsets
java.lang.Object
edu.cmu.tetrad.search.utils.DagSepsets
- All Implemented Interfaces:
SepsetProducer
Determines sepsets, collider, and noncolliders by examining d-separation facts in a DAG.
- Author:
- josephramsey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDag()
Returns the DAG being analyzed.double
getScore()
Not implemented; required for an interface.Returns the list of sepset for {a, b}.Returns the nodes in the DAG.boolean
isIndependent
(Node a, Node b, Set<Node> c) Returns true just in case msep(a, b | c) in the DAG.boolean
isUnshieldedCollider
(Node i, Node j, Node k) True iff i*-*j*-*k is an unshielded collider.void
setVerbose
(boolean verbose) Thsi method is not used.
-
Constructor Details
-
DagSepsets
Constructs a new DagSepsets object for the given DAG.- Parameters:
dag
- the DAG.
-
-
Method Details
-
getSepset
Returns the list of sepset for {a, b}.- Specified by:
getSepset
in interfaceSepsetProducer
- Parameters:
a
- One node.b
- The other node.- Returns:
- The list of sepsets for {a, b}.
-
isUnshieldedCollider
True iff i*-*j*-*k is an unshielded collider.- Specified by:
isUnshieldedCollider
in interfaceSepsetProducer
- Parameters:
i
- Node 1j
- Node 2k
- Node 3- Returns:
- True if the condition holds.
-
getScore
public double getScore()Not implemented; required for an interface.- Specified by:
getScore
in interfaceSepsetProducer
- Throws:
javax.help.UnsupportedOperationException
- Since this is not implemented.
-
isIndependent
Returns true just in case msep(a, b | c) in the DAG. Don't let the name isIndependent fool you; this is a d-separation method. We only use the name isIndependent so that this can be used in place of an independence check.- Specified by:
isIndependent
in interfaceSepsetProducer
- Parameters:
a
- Node 1b
- NOde 2c
- A set of conditoning nodes.- Returns:
- True if the condition holds.
-
getVariables
Returns the nodes in the DAG.- Specified by:
getVariables
in interfaceSepsetProducer
- Returns:
- This list.
-
setVerbose
public void setVerbose(boolean verbose) Thsi method is not used.- Specified by:
setVerbose
in interfaceSepsetProducer
- Throws:
javax.help.UnsupportedOperationException
- Since this method is not used (but is required by an interface).
-
getDag
Returns the DAG being analyzed.- Returns:
- This DAG.
-