Package edu.cmu.tetrad.search.utils
Class SepsetsMinP
java.lang.Object
edu.cmu.tetrad.search.utils.SepsetsMinP
- 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. This version uses conservative reasoning (see the CPC algorithm).
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSepsetsMinP(Graph graph, IndependenceTest independenceTest, SepsetMap extraSepsets, int depth) Constructor for SepsetsConservative. -
Method Summary
Modifier and TypeMethodDescriptionGetter for the fieldindependenceTest.doubleReturns the p-value for the independence test between two nodes, given a set of separator nodes.doublegetScore()getScore.Returns the set of nodes that form the sepset (separating set) between two given nodes.getSepsetContaining(Node i, Node k, Set<Node> s) Returns the set of nodes that form the sepset (separating set) between two given nodes containing all the nodes in the given set.getSepsetsLists(Node x, Node y, Node z, IndependenceTest test, int depth, boolean verbose) getSepsetsLists.getVariables.booleanisIndependent(Node a, Node b, Set<Node> sepset) Determines if two nodes are independent given a set of separator nodes.booleanisUnshieldedCollider(Node i, Node j, Node k) isUnshieldedCollider.voidsetVerbose(boolean verbose) setVerbose.
-
Constructor Details
-
SepsetsMinP
public SepsetsMinP(Graph graph, IndependenceTest independenceTest, SepsetMap extraSepsets, int depth) Constructor for SepsetsConservative.
- Parameters:
graph- aGraphobjectindependenceTest- aIndependenceTestobjectextraSepsets- aSepsetMapobjectdepth- a int
-
-
Method Details
-
getSepset
Returns the set of nodes that form the sepset (separating set) between two given nodes.- Specified by:
getSepsetin interfaceSepsetProducer- Parameters:
i- aNodeobject representing the first node.k- aNodeobject representing the second node.- Returns:
- a
Setof nodes that form the sepset between the two given nodes.
-
getSepsetContaining
Returns the set of nodes that form the sepset (separating set) between two given nodes containing all the nodes in the given set. If there is no required set of nodes to include, pass null for s.- Specified by:
getSepsetContainingin interfaceSepsetProducer- Parameters:
i- aNodeobject representing the first node.k- aNodeobject representing the second node.s- aSetof nodes to that must be included in the sepset, or null if there is no such requirement.- Returns:
- a
Setof nodes that form the sepset between the two given nodes.
-
isUnshieldedCollider
isUnshieldedCollider.
- Specified by:
isUnshieldedColliderin interfaceSepsetProducer- Parameters:
i- aNodeobjectj- aNodeobjectk- aNodeobject- Returns:
- a boolean
-
getSepsetsLists
public List<List<Set<Node>>> getSepsetsLists(Node x, Node y, Node z, IndependenceTest test, int depth, boolean verbose) getSepsetsLists.
- Parameters:
x- aNodeobjecty- aNodeobjectz- aNodeobjecttest- aIndependenceTestobjectdepth- a intverbose- a boolean- Returns:
- a
Listobject
-
isIndependent
Determines if two nodes are independent given a set of separator nodes.- Specified by:
isIndependentin interfaceSepsetProducer- Parameters:
a- ANodeobject representing the first node.b- ANodeobject representing the second node.sepset- ASetobject representing the set of separator nodes.- Returns:
- True if the nodes are independent, false otherwise.
-
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
-
setVerbose
public void setVerbose(boolean verbose) setVerbose.
- Specified by:
setVerbosein interfaceSepsetProducer- Parameters:
verbose- a boolean
-
getIndependenceTest
Getter for the field
independenceTest.- Returns:
- a
IndependenceTestobject
-