Class Fci
- All Implemented Interfaces:
IGraphSearch
Two alternatives are provided for doing the final orientation step, one due to Peter Spirtes, which is arrow complete, and another due to Jiji Zhang, which is arrow and tail complete.
This algorithm, with the Spirtes final orientation rules, was given in an earlier version of this book:
Spirtes, P., Glymour, C. N., Scheines, R., & Heckerman, D. (2000). Causation, prediction, and search. MIT press.
The algorithm with the Zhang final orientation rules was given in this reference:
Zhang, J. (2008). On the completeness of orientation rules for causal discovery in the presence of latent confounders and selection bias. Artificial Intelligence, 172(16-17), 1873-1896.
This class is configured to respect knowledge of forbidden and required edges, including knowledge of temporal tiers.
- Version:
- $Id: $Id
- Author:
- peterspirtes, clarkglymour, jijizhang, josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFci
(IndependenceTest independenceTest) Constructor.Fci
(IndependenceTest independenceTest, List<Node> searchVars) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the elapsed time of search.Returns the independence test used in search.Returns the background knowledge that was set.Returns the sepset map from FAS.search()
Performs a search using the FCI algorithm.void
setCompleteRuleSetUsed
(boolean completeRuleSetUsed) Sets whether the Zhang complete rule set should be used; false if only R1-R4 (the rule set of the original FCI) should be used.void
setDepth
(int depth) Sets the depth of search, which is the maximum number of variables conditioned on in any test.void
setGuaranteePag
(boolean guaranteePag) Sets whether to guarantee the output is a PAG by repairing a faulty PAG.void
setKnowledge
(Knowledge knowledge) Sets background knowledge for the search.void
setMaxDiscriminatingPathLength
(int maxDiscriminatingPathLength) Sets the maximum length of any discriminating path.void
setPcHeuristicType
(PcCommon.PcHeuristicType heuristic) Sets which PC heuristic type should be used in the initial adjacency search.void
setPossibleDsepSearchDone
(boolean possibleMsepSearchDone) Sets whether the (time-consuming) possible msep step should be done.void
setStable
(boolean stable) Sets whether the stable options should be used in the initial adjacency search.void
setVerbose
(boolean verbose) Sets whether verbose output should be printed.
-
Constructor Details
-
Fci
Constructor.- Parameters:
independenceTest
- The test to use for oracle conditional independence information.
-
Fci
Constructor.- Parameters:
independenceTest
- The test to use for oracle conditional independence information.searchVars
- A specific list of variables to search over.
-
-
Method Details
-
search
Performs a search using the FCI algorithm.- Specified by:
search
in interfaceIGraphSearch
- Returns:
- The resulting graph.
- Throws:
InterruptedException
- if any.
-
setDepth
public void setDepth(int depth) Sets the depth of search, which is the maximum number of variables conditioned on in any test.- Parameters:
depth
- This maximum.
-
getElapsedTime
public long getElapsedTime()Returns the elapsed time of search.- Returns:
- This time.
-
getSepsets
-
getKnowledge
Returns the background knowledge that was set.- Returns:
- This knowledge.
-
setKnowledge
Sets background knowledge for the search.- Parameters:
knowledge
- This knowledge.
-
setCompleteRuleSetUsed
public void setCompleteRuleSetUsed(boolean completeRuleSetUsed) Sets whether the Zhang complete rule set should be used; false if only R1-R4 (the rule set of the original FCI) should be used. False by default.- Parameters:
completeRuleSetUsed
- True for the complete Zhang rule set.
-
setPossibleDsepSearchDone
public void setPossibleDsepSearchDone(boolean possibleMsepSearchDone) Sets whether the (time-consuming) possible msep step should be done.- Parameters:
possibleMsepSearchDone
- True, if so.
-
setMaxDiscriminatingPathLength
public void setMaxDiscriminatingPathLength(int maxDiscriminatingPathLength) Sets the maximum length of any discriminating path.- Parameters:
maxDiscriminatingPathLength
- the maximum length of any discriminating path, or -1 if unlimited.
-
setVerbose
public void setVerbose(boolean verbose) Sets whether verbose output should be printed.- Parameters:
verbose
- True, if so.
-
getIndependenceTest
Returns the independence test used in search.- Returns:
- This test.
-
setPcHeuristicType
Sets which PC heuristic type should be used in the initial adjacency search.- Parameters:
heuristic
- The heuristic type.- See Also:
-
setStable
public void setStable(boolean stable) Sets whether the stable options should be used in the initial adjacency search.- Parameters:
stable
- True, if so.- See Also:
-
setGuaranteePag
public void setGuaranteePag(boolean guaranteePag) Sets whether to guarantee the output is a PAG by repairing a faulty PAG.- Parameters:
guaranteePag
- True, if so.
-