Package edu.cmu.tetrad.search
Class GraspFci
java.lang.Object
edu.cmu.tetrad.search.GraspFci
- All Implemented Interfaces:
IGraphSearch
Uses GRaSP in place of FGES for the initial step in the GFCI algorithm. This tends to produce a accurate PAG than
GFCI as a result, for the latent variables case. This is a simple substitution; the reference for GFCI is here: J.M.
Ogarrio and P. Spirtes and J. Ramsey, "A Hybrid Causal Search Algorithm for Latent Variable Models," JMLR 2016. Here,
BOSS has been substituted for FGES.
For the first step, the GRaSP algorithm is used, with the same modifications as in the GFCI algorithm.
For the second step, the FCI final orientation algorithm is used, with the same modifications as in the GFCI algorithm.
For GRaSP only a score is needed, but there are steps in GFCI that require a test, so for this method, both a test and a score need to be given.
This class is configured to respect knowledge of forbidden and required edges, including knowledge of temporal tiers.
- Version:
- $Id: $Id
- Author:
- josephramsey, bryanandrews
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGraspFci
(IndependenceTest test, Score score) Constructs a new GraspFci object. -
Method Summary
Modifier and TypeMethodDescriptionsearch()
Run the search and return s a PAG.void
setCompleteRuleSetUsed
(boolean completeRuleSetUsed) Sets whether Zhang's complete rules set is used.void
setDepth
(int depth) Sets the depth for the search algorithm.void
setGuaranteePag
(boolean guaranteePag) Sets the flag for whether to guarantee the output is a legal PAG.void
setKnowledge
(Knowledge knowledge) Sets the knowledge used in search.void
setMaxDiscriminatingPathLength
(int maxDiscriminatingPathLength) Sets the maximum length of any discriminating path.void
setNonSingularDepth
(int nonSingularDepth) Sets depth for non-singular tucks.void
setNumStarts
(int numStarts) Sets the number of starts for GRaSP.void
setOrdered
(boolean ordered) Sets whether to use the ordered version of GRaSP.void
setSeed
(long seed) Setter for the fieldseed
.void
setSepsetFinderMethod
(int sepsetFinderMethod) Sets the method for finding sepsets in the GraspFci class.void
setSingularDepth
(int uncoveredDepth) Sets depth for singular tucks.void
setUseDataOrder
(boolean useDataOrder) Sets whether to use data order for GRaSP (as opposed to random order) for the first step of GRaSPvoid
setUseRaskuttiUhler
(boolean useRaskuttiUhler) Sets whether to use Raskutti and Uhler's modification of GRaSP.void
setUseScore
(boolean useScore) Sets whether to use score for GRaSP (as opposed to independence test) for GRaSP.void
setVerbose
(boolean verbose) Sets whether verbose output should be printed.
-
Constructor Details
-
GraspFci
Constructs a new GraspFci object.- Parameters:
test
- The independence test.score
- aScore
object
-
-
Method Details
-
search
Run the search and return s a PAG.- Specified by:
search
in interfaceIGraphSearch
- Returns:
- The PAG.
- Throws:
InterruptedException
- if any.
-
setKnowledge
Sets the knowledge used in search.- Parameters:
knowledge
- This knowledge.
-
setCompleteRuleSetUsed
public void setCompleteRuleSetUsed(boolean completeRuleSetUsed) Sets whether Zhang's complete rules set is 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.
-
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.
-
setNumStarts
public void setNumStarts(int numStarts) Sets the number of starts for GRaSP.- Parameters:
numStarts
- The number of starts.
-
setUseRaskuttiUhler
public void setUseRaskuttiUhler(boolean useRaskuttiUhler) Sets whether to use Raskutti and Uhler's modification of GRaSP.- Parameters:
useRaskuttiUhler
- True, if so.
-
setUseDataOrder
public void setUseDataOrder(boolean useDataOrder) Sets whether to use data order for GRaSP (as opposed to random order) for the first step of GRaSP- Parameters:
useDataOrder
- True, if so.
-
setUseScore
public void setUseScore(boolean useScore) Sets whether to use score for GRaSP (as opposed to independence test) for GRaSP.- Parameters:
useScore
- True, if so.
-
setSingularDepth
public void setSingularDepth(int uncoveredDepth) Sets depth for singular tucks.- Parameters:
uncoveredDepth
- The depth for singular tucks.
-
setNonSingularDepth
public void setNonSingularDepth(int nonSingularDepth) Sets depth for non-singular tucks.- Parameters:
nonSingularDepth
- The depth for non-singular tucks.
-
setOrdered
public void setOrdered(boolean ordered) Sets whether to use the ordered version of GRaSP.- Parameters:
ordered
- True, if so.
-
setSeed
public void setSeed(long seed) Setter for the field
seed
.- Parameters:
seed
- a long
-
setDepth
public void setDepth(int depth) Sets the depth for the search algorithm.- Parameters:
depth
- The depth value to set for the search algorithm.
-
setGuaranteePag
public void setGuaranteePag(boolean guaranteePag) Sets the flag for whether to guarantee the output is a legal PAG.- Parameters:
guaranteePag
- True, if so.
-
setSepsetFinderMethod
public void setSepsetFinderMethod(int sepsetFinderMethod) Sets the method for finding sepsets in the GraspFci class.- Parameters:
sepsetFinderMethod
- the method for finding sepsets
-