Package edu.cmu.tetrad.search.utils
Class SepsetsSet
java.lang.Object
edu.cmu.tetrad.search.utils.SepsetsSet
- All Implemented Interfaces:
SepsetProducer
Provides a sepset producer using conditional independence tests to generate the Sepset map.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSepsetsSet(SepsetMap sepsets, IndependenceTest test) Constructor for SepsetsSet. -
Method Summary
Modifier and TypeMethodDescriptiondoubleCalculates the p-value for a statistical test a _||_ b | sepset.doublegetScore()Returns the score of the object.Retrieves the sepset between two nodes.getSepsetContaining(Node a, Node b, Set<Node> s, int depth) Retrieves the sepset for a and b, where we are expecting this sepset to contain all the nodes in s.Retrieves the list of variables.booleanisIndependent(Node a, Node b, 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
-
SepsetsSet
Constructor for SepsetsSet.
- Parameters:
sepsets- aSepsetMapobjecttest- aIndependenceTestobject
-
-
Method Details
-
getSepset
Retrieves the sepset between two nodes.- Specified by:
getSepsetin interfaceSepsetProducer- Parameters:
a- the first nodeb- the second nodedepth- the depth of the searchorder- The order of the nodes, used for some implementations.- Returns:
- the set of nodes in the sepset between a and b
-
getSepsetContaining
Retrieves the sepset for a and b, where we are expecting this sepset to contain all the nodes in s.- Specified by:
getSepsetContainingin interfaceSepsetProducer- Parameters:
a- the first nodeb- the second nodes- the set of nodes to check in the sepset of a and bdepth- the depth of the search- Returns:
- the set of nodes that the sepset of a and b is expected to contain.
- Throws:
IllegalArgumentException- if the sepset of a and b does not contain all the nodes in s
-
getPValue
Description copied from interface:SepsetProducerCalculates the p-value for a statistical test a _||_ b | sepset.- Specified by:
getPValuein interfaceSepsetProducer- Parameters:
a- the first nodeb- the second nodesepset- the set of nodes- Returns:
- the p-value for the statistical test
- Throws:
UnsupportedOperationException- if this method is called
-
setGraph
Description copied from interface:SepsetProducerSets the graph for the SepsetProducer object.- Specified by:
setGraphin interfaceSepsetProducer- Parameters:
graph- the graph to set
-
isUnshieldedCollider
isUnshieldedCollider.
- Specified by:
isUnshieldedColliderin interfaceSepsetProducer- Parameters:
i- aNodeobjectj- aNodeobjectk- aNodeobjectdepth- the depth of the search- Returns:
- a boolean
-
isIndependent
Checks if node d is independent of node c given the set of nodes in sepset.- Specified by:
isIndependentin interfaceSepsetProducer- Parameters:
a- the first nodeb- 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
-
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
-