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 TypeMethodDescriptiondouble
Returns the p-value for the independence test between two nodes, given a set of separator nodes.double
getScore()
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.boolean
isIndependent
(Node d, Node c, Set<Node> sepset) isIndependent.boolean
isUnshieldedCollider
(Node i, Node j, Node k) isUnshieldedCollider.boolean
isVerbose.void
setVerbose
(boolean verbose) setVerbose.
-
Constructor Details
-
SepsetsPossibleMsep
public SepsetsPossibleMsep(Graph graph, IndependenceTest test, Knowledge knowledge, int depth, int maxPathLength) Constructor for SepsetsPossibleMsep.
- Parameters:
graph
- aGraph
objecttest
- aIndependenceTest
objectknowledge
- aKnowledge
objectdepth
- a intmaxPathLength
- a int
-
-
Method Details
-
getSepset
Retrieves the separation set (sepset) between two nodes.- Specified by:
getSepset
in 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:
getSepsetContaining
in 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:
isUnshieldedCollider
in interfaceSepsetProducer
- Parameters:
i
- aNode
objectj
- aNode
objectk
- aNode
object- Returns:
- a boolean
-
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
-
isIndependent
isIndependent.
- Specified by:
isIndependent
in interfaceSepsetProducer
- Parameters:
d
- aNode
objectc
- 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
-