Package edu.cmu.tetrad.search.utils
Class SepsetsPossibleDsep
java.lang.Object
edu.cmu.tetrad.search.utils.SepsetsPossibleDsep
- All Implemented Interfaces:
SepsetProducer
Provides a sepset producer using conditional independence tests to generate the Sepset map, for the case where possible dsep sets are required.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSepsetsPossibleDsep(Graph graph, IndependenceTest test, Knowledge knowledge, int depth, int maxDiscriminatingPathLength) Constructor for SepsetsPossibleDsep. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the p-value for the independence test between two nodes, given a set of separator nodes.doublegetScore()Returns the score of the object.Retrieves the separation set (sepset) between two nodes.getSepsetContaining(Node i, Node k, Set<Node> s, int depth) Retrieves the separation set (sepset) between two nodes i and k that contains a given set of nodes s.Retrieves the list of variables.booleanisIndependent(Node d, Node c, Set<Node> sepset) Checks if node d is independent of node c given the set of nodes in sepset.booleanisUnshieldedCollider(Node i, Node j, Node k, int depth) isUnshieldedCollider.booleanisVerbose.voidSets the graph for the SepsetProducer object.voidsetVerbose(boolean verbose) Sets the verbose mode of the SepsetProducer.
-
Constructor Details
-
SepsetsPossibleDsep
public SepsetsPossibleDsep(Graph graph, IndependenceTest test, Knowledge knowledge, int depth, int maxDiscriminatingPathLength) Constructor for SepsetsPossibleDsep.
- Parameters:
graph- aGraphobjecttest- aIndependenceTestobjectknowledge- aKnowledgeobjectdepth- the depth of the searchmaxDiscriminatingPathLength- the maximum length of discriminating paths
-
-
Method Details
-
getSepset
Retrieves the separation set (sepset) between two nodes.- Specified by:
getSepsetin interfaceSepsetProducer- Parameters:
i- The first nodek- The second nodedepth- The depth of the searchorder- The order of the nodes, used for some implementations.- Returns:
- The set of nodes that form the sepset between node i and node k, or null if no sepset exists
- Throws:
InterruptedException- if any
-
getSepsetContaining
public Set<Node> getSepsetContaining(Node i, Node k, Set<Node> s, int depth) throws InterruptedException 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 sepsetdepth- The depth of the search- 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
- Throws:
InterruptedException- if any
-
isUnshieldedCollider
isUnshieldedCollider.
- Specified by:
isUnshieldedColliderin interfaceSepsetProducer- Parameters:
i- aNodeobjectj- aNodeobjectk- aNodeobjectdepth- the depth of the search- Returns:
- a boolean
- Throws:
InterruptedException- if any
-
getScore
public double getScore()Returns the score of the object.- Specified by:
getScorein interfaceSepsetProducer- Returns:
- the score value
-
getVariables
Retrieves the list of variables.- Specified by:
getVariablesin interfaceSepsetProducer- Returns:
- the list of variables as a
ListofNodeobjects.
-
isVerbose
public boolean isVerbose()isVerbose.
- Returns:
- a boolean
-
setVerbose
public void setVerbose(boolean verbose) Sets the verbose mode of the SepsetProducer.- Specified by:
setVerbosein interfaceSepsetProducer- Parameters:
verbose- true if verbose mode is enabled, false otherwise
-
isIndependent
Checks if node d is independent of node c given the set of nodes in sepset.- Specified by:
isIndependentin interfaceSepsetProducer- Parameters:
d- the first nodec- the second nodesepset- the set of common neighbors between d and c- Returns:
- true if d is independent of c, false otherwise
- Throws:
InterruptedException- if any
-
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
- Throws:
InterruptedException- if any
-
setGraph
Description copied from interface:SepsetProducerSets the graph for the SepsetProducer object.- Specified by:
setGraphin interfaceSepsetProducer- Parameters:
graph- the graph to set
-