Package edu.cmu.tetrad.search
Class SpFci
java.lang.Object
edu.cmu.tetrad.search.StarFci
edu.cmu.tetrad.search.SpFci
- All Implemented Interfaces:
IGraphSearch
Uses SP in place of FGES for the initial step in the *-FCI algorithm.
For SP 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.
Note that SP considers all permutations of the algorithm, which is exponential in the number of variables. So SP is limited to about 10 variables.
This class is configured to respect knowledge of forbidden and required edges, including knowledge of temporal tiers.
- Version:
- $Id: $Id
- Author:
- josephramsey, bryan andrews
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSpFci(IndependenceTest test, Score score) Constructor; requires by ta test and a score, over the same variables. -
Method Summary
Modifier and TypeMethodDescriptionReturns a Markov CPDAG to use as the initial graph in the Star-FCI search.intReturns The maximum indegree of the output graph.intReturns the maximum length of any discriminating path, or -1 of unlimited.booleanReturns whether the complete rule set is used.voidsetCompleteRuleSetUsed(boolean completeRuleSetUsed) Sets whether Zhang's complete rule set is used.voidsetMaxDegree(int maxDegree) Sets the max degree of the search.voidsetMaxDiscriminatingPathLength(int maxDiscriminatingPathLength) Sets the maximum length of any discriminating path.voidsetOut(PrintStream out) Sets the output stream used to print.Methods inherited from class edu.cmu.tetrad.search.StarFci
getIndependenceTest, getKnowledge, isVerbose, search, sepsetSubsetOfAdjxOrAdjy, setDepth, setGuaranteePag, setKnowledge, setUseMaxP, setVerbose
-
Constructor Details
-
SpFci
Constructor; requires by ta test and a score, over the same variables.- Parameters:
test- The test.score- The score.
-
-
Method Details
-
getMarkovCpdag
Description copied from class:StarFciReturns a Markov CPDAG to use as the initial graph in the Star-FCI search.- Specified by:
getMarkovCpdagin classStarFci- Returns:
- This CPDAG.
- Throws:
InterruptedException- if interrupted.
-
getMaxDegree
public int getMaxDegree()Returns The maximum indegree of the output graph.- Returns:
- This maximum.
-
setMaxDegree
public void setMaxDegree(int maxDegree) Sets the max degree of the search.- Parameters:
maxDegree- This maximum.
-
isCompleteRuleSetUsed
public boolean isCompleteRuleSetUsed()Returns whether the complete rule set is 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 used.- Overrides:
setCompleteRuleSetUsedin classStarFci- 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.- Overrides:
setMaxDiscriminatingPathLengthin classStarFci- Parameters:
maxDiscriminatingPathLength- the maximum length of any discriminating path, or -1 if unlimited.
-
setOut
Sets the output stream used to print. Unused, but the implementation needs to be here.- Parameters:
out- This print stream.
-