Package edu.cmu.tetrad.search.utils
Class SepsetsGreedy
java.lang.Object
edu.cmu.tetrad.search.utils.SepsetsGreedy
- All Implemented Interfaces:
SepsetProducer
Provides a SepsetProcuder that selects the first sepset it comes to from among the extra sepsets or the adjacents of
i or k, or null if none is found.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSepsetsGreedy
(Graph graph, IndependenceTest independenceTest, SepsetMap extraSepsets, int depth, Knowledge knowledge) Constructor for SepsetsGreedy. -
Method Summary
Modifier and TypeMethodDescriptiongetDag()
getDag.double
Returns the p-value for the independence test between two nodes, given a set of separator nodes.double
getScore()
getScore.Retrieves the sepset (separating set) between two nodes, or null if no such sepset is found.getSepsetContaining
(Node i, Node k, Set<Node> s) Retrieves a sepset (separating set) between two nodes containing a set of nodes, or null if no such sepset is found.getVariables.boolean
isIndependent
(Node a, Node b, Set<Node> sepset) isIndependent.boolean
isUnshieldedCollider
(Node i, Node j, Node k) isUnshieldedCollider.boolean
isVerbose.void
setDepth
(int depth) Setter for the fielddepth
.void
setVerbose
(boolean verbose) setVerbose.
-
Constructor Details
-
SepsetsGreedy
public SepsetsGreedy(Graph graph, IndependenceTest independenceTest, SepsetMap extraSepsets, int depth, Knowledge knowledge) Constructor for SepsetsGreedy.
- Parameters:
graph
- aGraph
objectindependenceTest
- aIndependenceTest
objectextraSepsets
- aSepsetMap
objectdepth
- a intknowledge
- aKnowledge
object
-
-
Method Details
-
getSepset
Retrieves the sepset (separating set) between two nodes, or null if no such sepset is found.- Specified by:
getSepset
in interfaceSepsetProducer
- Parameters:
i
- The first nodek
- The second node- Returns:
- The sepset between the two nodes
-
getSepsetContaining
Retrieves a sepset (separating set) between two nodes containing a set of nodes, or null if no such sepset is found. If there is no required set of nodes, pass null for the set.- Specified by:
getSepsetContaining
in interfaceSepsetProducer
- Parameters:
i
- The first nodek
- The second nodes
- The set of nodes that must be contained in the sepset, or null if no such set is required.- Returns:
- The sepset between the two nodes
-
isUnshieldedCollider
isUnshieldedCollider.
- Specified by:
isUnshieldedCollider
in interfaceSepsetProducer
- Parameters:
i
- aNode
objectj
- aNode
objectk
- aNode
object- Returns:
- a boolean
-
isIndependent
isIndependent.
- Specified by:
isIndependent
in interfaceSepsetProducer
- Parameters:
a
- aNode
objectb
- aNode
objectsepset
- aSet
object- Returns:
- a boolean
-
getPValue
Returns the p-value for the independence test between two nodes, given a set of separator nodes.- Specified by:
getPValue
in interfaceSepsetProducer
- Parameters:
a
- the first nodeb
- the second nodesepset
- the set of separator nodes- Returns:
- the p-value for the independence test
-
getScore
public double getScore()getScore.
- Specified by:
getScore
in interfaceSepsetProducer
- Returns:
- a double
-
getVariables
getVariables.
- Specified by:
getVariables
in interfaceSepsetProducer
- Returns:
- a
List
object
-
isVerbose
public boolean isVerbose()isVerbose.
- Returns:
- a boolean
-
setVerbose
public void setVerbose(boolean verbose) setVerbose.
- Specified by:
setVerbose
in interfaceSepsetProducer
- Parameters:
verbose
- a boolean
-
getDag
getDag.
- Returns:
- a
Graph
object
-
setDepth
public void setDepth(int depth) Setter for the field
depth
.- Parameters:
depth
- a int
-