Package edu.cmu.tetrad.search.utils
Class PossibleMsepFci
java.lang.Object
edu.cmu.tetrad.search.utils.PossibleMsepFci
Implements the Possible-M-Sep search step of Spirtes, et al's (1993) FCI algorithm (pp 144-145). Specifically, the
methods in this class perform step D. of the algorithm. The algorithm implemented by this class is a bit broader,
however, because it allows for the possibility that some pairs of variables have already been compared by a different
algorithm. Specifically, if the
prevCheck
variable is provided in the constructor, then the algorithm
pairwise checks every variable in the graph with every variable in v \
prevCheck
(that is, the unchecked variables). This feature is used by the CIVI algorithm of Danks's
"Efficient Inclusion of Novel Variables."- Version:
- $Id: $Id
- Author:
- David Danks
-
Constructor Summary
ConstructorsConstructorDescriptionPossibleMsepFci
(Graph graph, IndependenceTest test) Creates a new SepSet and assumes that none of the variables have yet been checked. -
Method Summary
Modifier and TypeMethodDescriptionint
getDepth()
Getter for the fielddepth
.Getter for the fieldknowledge
.getSepset
(IndependenceTest test, Node node1, Node node2) Getter for the fieldsepset
.search()
Performs pairwise comparisons of each variable in the graph with the variables that have not already been checked.void
setDepth
(int depth) Setter for the fielddepth
.void
setKnowledge
(Knowledge knowledge) Setter for the fieldknowledge
.void
setMaxReachablePathLength
(int maxReachablePathLength) Sets the maximum reachable path length for the search algorithm.
-
Constructor Details
-
PossibleMsepFci
Creates a new SepSet and assumes that none of the variables have yet been checked.- Parameters:
graph
- The GaSearchGraph on which to worktest
- The IndependenceChecker to use as an oracle
-
-
Method Details
-
search
Performs pairwise comparisons of each variable in the graph with the variables that have not already been checked. We get the Possible-M-Sep sets for the pair of variables, and we check to see if they are independent conditional on some subset of the union of Possible-M-Sep sets. This method returns the SepSet passed in the constructor (if any), possibly augmented by some edge removals in this step. The GaSearchGraph passed in the constructor is directly changed.- Returns:
- a
SepsetMap
object - Throws:
InterruptedException
-
getSepset
public Set<Node> getSepset(IndependenceTest test, Node node1, Node node2) throws InterruptedException Getter for the field
sepset
.- Parameters:
test
- aIndependenceTest
objectnode1
- aNode
objectnode2
- aNode
object- Returns:
- a
Set
object - Throws:
InterruptedException
-
getDepth
public int getDepth()Getter for the field
depth
.- Returns:
- a int
-
setDepth
public void setDepth(int depth) Setter for the field
depth
.- Parameters:
depth
- a int
-
getKnowledge
-
setKnowledge
-
setMaxReachablePathLength
public void setMaxReachablePathLength(int maxReachablePathLength) Sets the maximum reachable path length for the search algorithm.- Parameters:
maxReachablePathLength
- The maximum reachable path length. Must be -1 (unlimited) or >= 0.- Throws:
IllegalArgumentException
- if maxReachablePathLength is less than -1.
-