Package edu.cmu.tetrad.search.utils
Class SepsetsPossibleMsep
java.lang.Object
edu.cmu.tetrad.search.utils.SepsetsPossibleMsep
- All Implemented Interfaces:
SepsetProducer
Provides a sepset producer using conditional independence tests to generate the Sepset map, for the case where possible msep sets are required.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSepsetsPossibleMsep(Graph graph, IndependenceTest test, Knowledge knowledge, int depth, int maxPathLength) Constructor for SepsetsPossibleMsep. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the p-value for the independence test between two nodes, given a set of separator nodes.doublegetScore()getScore.Retrieves the separation set (sepset) between two nodes.getSepsetContaining(Node i, Node k, Set<Node> s) Retrieves the separation set (sepset) between two nodes i and k that contains a given set of nodes s.getVariables.booleanisIndependent(Node d, Node c, Set<Node> sepset) isIndependent.booleanisUnshieldedCollider(Node i, Node j, Node k) isUnshieldedCollider.booleanisVerbose.voidsetVerbose(boolean verbose) setVerbose.
-
Constructor Details
-
SepsetsPossibleMsep
public SepsetsPossibleMsep(Graph graph, IndependenceTest test, Knowledge knowledge, int depth, int maxPathLength) Constructor for SepsetsPossibleMsep.
- Parameters:
graph- aGraphobjecttest- aIndependenceTestobjectknowledge- aKnowledgeobjectdepth- a intmaxPathLength- a int
-
-
Method Details
-
getSepset
Retrieves the separation set (sepset) between two nodes.- Specified by:
getSepsetin interfaceSepsetProducer- Parameters:
i- The first nodek- The second node- Returns:
- The set of nodes that form the sepset between node i and node k, or null if no sepset exists
-
getSepsetContaining
Retrieves the separation set (sepset) between two nodes i and k that contains a given set of nodes s. 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 to be contained in the sepset- Returns:
- The set of nodes that form the sepset between node i and node k and contains all nodes from set s, or null if no sepset exists
-
isUnshieldedCollider
isUnshieldedCollider.
- Specified by:
isUnshieldedColliderin interfaceSepsetProducer- Parameters:
i- aNodeobjectj- aNodeobjectk- aNodeobject- Returns:
- a boolean
-
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
-
isIndependent
isIndependent.
- Specified by:
isIndependentin interfaceSepsetProducer- Parameters:
d- aNodeobjectc- 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
-