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.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDag()Returns the DAG being analyzed.doubleCalculates the p-value for a statistical test a _||_ b | sepset.doublegetScore()getScore.getSepset.getSepsetContaining(Node a, Node b, Set<Node> s) Returns the sepset containing nodes 'a' and 'b' that also contains all the nodes in the given set 's'.getVariables.booleanisIndependent(Node a, Node b, Set<Node> sepset) isIndependent.booleanisUnshieldedCollider(Node i, Node j, Node k) isUnshieldedCollider.voidsetVerbose(boolean verbose) setVerbose.
-
Constructor Details
-
DagSepsets
Constructs a new DagSepsets object for the given DAG.- Parameters:
dag- the DAG.
-
-
Method Details
-
getSepset
getSepset.
Returns the list of sepset for {a, b}.
- Specified by:
getSepsetin interfaceSepsetProducer- Parameters:
a- aNodeobjectb- aNodeobject- Returns:
- a
Setobject
-
getSepsetContaining
Returns the sepset containing nodes 'a' and 'b' that also contains all the nodes in the given set 's'. Note that for the DAG case, it is expected that any sepset containing 'a' and 'b' will contain all the nodes in 's'; otherwise, an exception is thrown.- Specified by:
getSepsetContainingin interfaceSepsetProducer- Parameters:
a- The first node.b- The second node.s- The set of nodes that must be contained in the sepset.- Returns:
- The sepset containing 'a' and 'b' that also contains all the nodes in 's'.
- Throws:
IllegalArgumentException- If the sepset of 'a' and 'b' does not contain all the nodes in 's'.
-
isUnshieldedCollider
isUnshieldedCollider.
True iff i*-*j*-*k is an unshielded collider.
- Specified by:
isUnshieldedColliderin interfaceSepsetProducer- Parameters:
i- aNodeobjectj- aNodeobjectk- aNodeobject- Returns:
- a boolean
-
getScore
public double getScore()getScore.
Not implemented; required for an interface.
- Specified by:
getScorein interfaceSepsetProducer- Returns:
- a double
-
isIndependent
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:
isIndependentin interfaceSepsetProducer- Parameters:
a- aNodeobjectb- aNodeobjectsepset- aSetobject- Returns:
- a boolean
-
getPValue
Description copied from interface:SepsetProducerCalculates the p-value for a statistical test a _||_ b | sepset.- Specified by:
getPValuein interfaceSepsetProducer- Parameters:
a- the first nodeb- the second nodesepset- the set of nodes- Returns:
- the p-value for the statistical test
- Throws:
javax.help.UnsupportedOperationException- if this method is called.
-
getVariables
getVariables.
Returns the nodes in the DAG.
- Specified by:
getVariablesin interfaceSepsetProducer- Returns:
- a
Listobject
-
setVerbose
public void setVerbose(boolean verbose) setVerbose.
Thsi method is not used.
- Specified by:
setVerbosein interfaceSepsetProducer- Parameters:
verbose- a boolean
-
getDag
Returns the DAG being analyzed.- Returns:
- This DAG.
-