Class FciMax
- All Implemented Interfaces:
IGraphSearch
Modifies FCI to do orientation of unshielded colliders (X*-*Y*-*Z with X and Z not adjacent) using the max-P rule (see the PC-Max algorithm). This reference is relevant:
Raghu, V. K., Zhao, W., Pu, J., Leader, J. K., Wang, R., Herman, J., ... & Wilson, D. O. (2019). Feasibility of lung cancer prediction from low-dose CT scan and smoking factors using causal models. Thorax, 74(7), 643-649.
Max-P triple orientation is a method for orienting unshielded triples X*=-*Y*-*Z as one of the following: (a) Collider, X->Yinvalid input: '<'-Z, or (b) Noncollider, X-->Y-->Z, or Xinvalid input: '<'-Yinvalid input: '<'-Z, or Xinvalid input: '<'-Y->Z. One does this by conditioning on subsets of adj(X) or adj(Z). One first checks conditional independence of X and Z conditional on each of these subsets, and lists the p-values for each test. Then, one chooses the conditioning set out of all of these that maximizes the p-value. If this conditioning set contains Y, then the triple is judged to be a noncollider; otherwise, it is judged to be a collider.
All unshielded triples in the graph given by FAS are judged as colliders or non-colliders and the colliders oriented. Then the final FCI orientation rules are applied, as in FCI.
This class is configured to respect knowledge of forbidden and required edges, including knowledge of temporal tiers.
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFciMax
(IndependenceTest independenceTest) Constructor.FciMax
(IndependenceTest independenceTest, List<Node> searchVars) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the elapsed time of search.Returns the independence test used in search.Retrieves the background knowledge that was set.Retrieves the map from variable pairs to sepsets from the FAS search.search()
Performs the search and returns the PAG.void
setCompleteRuleSetUsed
(boolean completeRuleSetUsed) Sets whether Zhang's complete ruleset is used in the search.void
setDepth
(int depth) Sets the maximum nubmer of variables conditonied in any test.void
setDoDiscriminatingPathRule
(boolean doDiscriminatingPathRule) Sets whether the discriminating path rule will be used in search.void
setHeuristic
(int heuristic) Sets the FAS heuristic from PC used in search.void
setKnowledge
(Knowledge knowledge) Sets background knowledge for the search.void
setMaxPathLength
(int maxPathLength) Sets the maximum length of any discriminating path, or -1 if unlimited.void
setPossibleDsepSearchDone
(boolean possibleDsepSearchDone) Sets whether the (time-consuming) possible dsep step should be done.void
setStable
(boolean stable) Sets whetehr the stable option will be used for search.void
setVerbose
(boolean verbose) Sets whether verbose output should be printed.
-
Constructor Details
-
FciMax
Constructor. -
FciMax
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 the search and returns the PAG.- Specified by:
search
in interfaceIGraphSearch
- Returns:
- This PAG.
-
setDepth
public void setDepth(int depth) Sets the maximum nubmer of variables conditonied in any test.- Parameters:
depth
- This maximum.
-
getElapsedTime
public long getElapsedTime()Returns the elapsed time of search.- Returns:
- This time.
-
getSepsets
Retrieves the map from variable pairs to sepsets from the FAS search.- Returns:
- This map.
-
getKnowledge
Retrieves the background knowledge that was set.- Returns:
- This knoweldge,
-
setKnowledge
Sets background knowledge for the search.- Parameters:
knowledge
- This knowledge,
-
setCompleteRuleSetUsed
public void setCompleteRuleSetUsed(boolean completeRuleSetUsed) Sets whether Zhang's complete ruleset is used in the search.- 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.
-
setPossibleDsepSearchDone
public void setPossibleDsepSearchDone(boolean possibleDsepSearchDone) Sets whether the (time-consuming) possible dsep step should be done.- Parameters:
possibleDsepSearchDone
- True if so.
-
setMaxPathLength
public void setMaxPathLength(int maxPathLength) Sets the maximum length of any discriminating path, or -1 if unlimited.- Parameters:
maxPathLength
- This maximum.
-
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.
-
setHeuristic
public void setHeuristic(int heuristic) Sets the FAS heuristic from PC used in search.- Parameters:
heuristic
- This heuristic.- See Also:
-
setStable
public void setStable(boolean stable) Sets whetehr the stable option will be used for search.- Parameters:
stable
- True if so.
-
setDoDiscriminatingPathRule
public void setDoDiscriminatingPathRule(boolean doDiscriminatingPathRule) Sets whether the discriminating path rule will be used in search.- Parameters:
doDiscriminatingPathRule
- True if so.
-