Class SpFci

java.lang.Object
edu.cmu.tetrad.search.StarFci
edu.cmu.tetrad.search.SpFci
All Implemented Interfaces:
IGraphSearch

public final class SpFci extends StarFci
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 Details

    • SpFci

      public SpFci(IndependenceTest test, Score score)
      Constructor; requires by ta test and a score, over the same variables.
      Parameters:
      test - The test.
      score - The score.
  • Method Details

    • getMarkovCpdag

      public Graph getMarkovCpdag() throws InterruptedException
      Description copied from class: StarFci
      Returns a Markov CPDAG to use as the initial graph in the Star-FCI search.
      Specified by:
      getMarkovCpdag in class StarFci
      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:
      setCompleteRuleSetUsed in class StarFci
      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:
      setMaxDiscriminatingPathLength in class StarFci
      Parameters:
      maxDiscriminatingPathLength - the maximum length of any discriminating path, or -1 if unlimited.
    • setOut

      public void setOut(PrintStream out)
      Sets the output stream used to print. Unused, but the implementation needs to be here.
      Parameters:
      out - This print stream.