Class SvarFci
- All Implemented Interfaces:
IGraphSearch
This class is based off a copy of FCI.java taken from the repository on 2008/12/16, revision 7306. The extension is done by extending doFinalOrientation() with methods for Zhang's rules R5-R10 which implements the augmented search. (By a remark of Zhang's, the rule applications can be staged in this way.)
The references are as follows:
Malinsky, D., & Spirtes, P. (2018, August). Causal structure learning from multivariate time series in settings with unmeasured confounding. In Proceedings of 2018 ACM SIGKDD workshop on causal discovery (pp. 23-47). PMLR.
Entner, D., & Hoyer, P. O. (2010). On causal discovery from time series data using FCI. Probabilistic graphical models, 121-128.
This class is configured to respect knowledge of forbidden and required edges, including knowledge of temporal tiers.
- Version:
- $Id: $Id
- Author:
- danielmalinsky
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSvarFci
(IndependenceTest independenceTest) Constructs a new FCI search for the given independence test and background knowledge. -
Method Summary
Modifier and TypeMethodDescriptionint
getDepth()
Returns the depth of search--i.e., the maximum number of conditioning variables for tests.Returns independence test.Returns the knowledge for the search.int
Returns the maximum length of any discriminating path, or -1 of unlimited.getNameNoLag
(Object obj) Returns the name of the given object without any lagging characters.Returns the map from node pairs to sepsets.boolean
Returns whether Zhang's complete rule set is to be used.boolean
Returns whether verbose output is to be printed.search()
Runs the search and returns the PAG.Runs the search using a particular implementation of FAS.void
setCompleteRuleSetUsed
(boolean completeRuleSetUsed) Sets whether Zhang's complete rule set is to be used.void
setDepth
(int depth) Sets the depth of search.void
setGuaranteePag
(boolean guaranteePag) Sets whether a guaranteed partial ancestral graph (PAG) should be built during the search.void
setKnowledge
(Knowledge knowledge) Sets the knowledge for the search.void
setMaxDiscriminatingPathLength
(int maxDiscriminatingPathLength) Sets the maximum length of any discriminating path.void
setResolveAlmostCyclicPaths
(boolean resolveAlmostCyclicPaths) Sets whether almost cyclic paths should be resolved during the search.void
setVerbose
(boolean verbose) Sets whether verbose output is to be printed.
-
Constructor Details
-
SvarFci
Constructs a new FCI search for the given independence test and background knowledge.- Parameters:
independenceTest
- aIndependenceTest
object
-
-
Method Details
-
getDepth
public int getDepth()Returns the depth of search--i.e., the maximum number of conditioning variables for tests.- Returns:
- This maximum.
-
setDepth
public void setDepth(int depth) Sets the depth of search.- Parameters:
depth
- This depth- See Also:
-
search
Runs the search and returns the PAG.- Specified by:
search
in interfaceIGraphSearch
- Returns:
- This PAG.
- Throws:
InterruptedException
- if any.
-
search
Runs the search using a particular implementation of FAS.- Parameters:
fas
- The FAS to use.- Returns:
- The PAG.
- Throws:
InterruptedException
- See Also:
-
getSepsets
-
getKnowledge
-
setKnowledge
Sets the knowledge for the search.- Parameters:
knowledge
- This knowledge.
-
isCompleteRuleSetUsed
public boolean isCompleteRuleSetUsed()Returns whether Zhang's complete rule set is to be used.- Returns:
- true if Zhang's complete rule set should be used, false if only R1-R4 (the rule set of the original FCI) should be used. False by default.
-
setCompleteRuleSetUsed
public void setCompleteRuleSetUsed(boolean completeRuleSetUsed) Sets whether Zhang's complete rule set is to be used.- Parameters:
completeRuleSetUsed
- set to true if Zhang's complete rule set should be used, false if only R1-R4 (the rule set of the original FCI) should be used. False by default.
-
getMaxDiscriminatingPathLength
public int getMaxDiscriminatingPathLength()Returns the maximum length of any discriminating path, or -1 of unlimited.- Returns:
- This length.
-
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.
-
isVerbose
public boolean isVerbose()Returns whether verbose output is to be printed.- Returns:
- True, if so.
-
setVerbose
public void setVerbose(boolean verbose) Sets whether verbose output is to be printed.- Parameters:
verbose
- True, if so.
-
getIndependenceTest
-
getNameNoLag
-
setResolveAlmostCyclicPaths
public void setResolveAlmostCyclicPaths(boolean resolveAlmostCyclicPaths) Sets whether almost cyclic paths should be resolved during the search.- Parameters:
resolveAlmostCyclicPaths
- true if almost cyclic paths should be resolved, false otherwise
-
setGuaranteePag
public void setGuaranteePag(boolean guaranteePag) Sets whether a guaranteed partial ancestral graph (PAG) should be built during the search. When set to true, the search algorithm will construct a PAG even if it cannot guarantee its correctness. When set to false, the search algorithm may return a PAG that is not fully connected or has other inconsistencies.- Parameters:
guaranteePag
- true to guarantee the construction of a PAG, false otherwise
-