Class GraspFci

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

public final class GraspFci extends Object implements 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

    Constructors
    Constructor
    Description
    Constructs a new GraspFci object.
  • Method Summary

    Modifier and Type
    Method
    Description
    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 GRaSP.
    void
    setDoDiscriminatingPathRule(boolean doDiscriminatingPathRule)
    Sets whether to use the discriminating path rule for GRaSP.
    void
    Sets the knowledge used in search.
    void
    setMaxPathLength(int maxPathLength)
    Sets the maximum length of any discriminating path searched.
    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
    setResolveAlmostCyclicPaths(boolean resolveAlmostCyclicPaths)
    Sets whether to resolve almost cyclic paths in the search.
    void
    setSeed(long seed)
    Setter for the field seed.
    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 GRaSP
    void
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GraspFci

      public GraspFci(IndependenceTest test, Score score)
      Constructs a new GraspFci object.
      Parameters:
      test - The independence test.
      score - a Score object
  • Method Details

    • search

      public Graph search()
      Run the search and return s a PAG.
      Specified by:
      search in interface IGraphSearch
      Returns:
      The PAG.
    • setKnowledge

      public void setKnowledge(Knowledge knowledge)
      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.
    • setMaxPathLength

      public void setMaxPathLength(int maxPathLength)
      Sets the maximum length of any discriminating path searched.
      Parameters:
      maxPathLength - 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.
    • setDepth

      public void setDepth(int depth)
      Sets the depth for GRaSP.
      Parameters:
      depth - The depth.
    • 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.
    • setDoDiscriminatingPathRule

      public void setDoDiscriminatingPathRule(boolean doDiscriminatingPathRule)
      Sets whether to use the discriminating path rule for GRaSP.
      Parameters:
      doDiscriminatingPathRule - 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
    • setResolveAlmostCyclicPaths

      public void setResolveAlmostCyclicPaths(boolean resolveAlmostCyclicPaths)
      Sets whether to resolve almost cyclic paths in the search.
      Parameters:
      resolveAlmostCyclicPaths - True, if almost cyclic paths should be resolved. False, otherwise.