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.doubleReturns the p-value for the independence test between two nodes, given a set of separator nodes.doublegetScore()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.booleanisIndependent(Node a, Node b, Set<Node> sepset) isIndependent.booleanisUnshieldedCollider(Node i, Node j, Node k) isUnshieldedCollider.booleanisVerbose.voidsetDepth(int depth) Setter for the fielddepth.voidsetVerbose(boolean verbose) setVerbose.
-
Constructor Details
-
SepsetsGreedy
public SepsetsGreedy(Graph graph, IndependenceTest independenceTest, SepsetMap extraSepsets, int depth, Knowledge knowledge) Constructor for SepsetsGreedy.
- Parameters:
graph- aGraphobjectindependenceTest- aIndependenceTestobjectextraSepsets- aSepsetMapobjectdepth- a intknowledge- aKnowledgeobject
-
-
Method Details
-
getSepset
Retrieves the sepset (separating set) between two nodes, or null if no such sepset is found.- Specified by:
getSepsetin 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:
getSepsetContainingin 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:
isUnshieldedColliderin interfaceSepsetProducer- Parameters:
i- aNodeobjectj- aNodeobjectk- aNodeobject- Returns:
- a boolean
-
isIndependent
isIndependent.
- Specified by:
isIndependentin interfaceSepsetProducer- Parameters:
a- aNodeobjectb- aNodeobjectsepset- aSetobject- Returns:
- a boolean
-
getPValue
Returns the p-value for the independence test between two nodes, given a set of separator nodes.- Specified by:
getPValuein 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:
getScorein interfaceSepsetProducer- Returns:
- a double
-
getVariables
getVariables.
- Specified by:
getVariablesin interfaceSepsetProducer- Returns:
- a
Listobject
-
isVerbose
public boolean isVerbose()isVerbose.
- Returns:
- a boolean
-
setVerbose
public void setVerbose(boolean verbose) setVerbose.
- Specified by:
setVerbosein interfaceSepsetProducer- Parameters:
verbose- a boolean
-
getDag
getDag.
- Returns:
- a
Graphobject
-
setDepth
public void setDepth(int depth) Setter for the field
depth.- Parameters:
depth- a int
-