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 the search algorithm.
    void
    setDoDiscriminatingPathColliderRule(boolean doDiscriminatingPathColliderRule)
    Sets whether to use the discriminating path collider rule for GRaSP.
    void
    setDoDiscriminatingPathTailRule(boolean doDiscriminatingPathTailRule)
    Sets whether to use the discriminating path tail rule for GRaSP.
    void
    setGuaranteePag(boolean guaranteePag)
    Sets the flag for whether to guarantee the output is a legal PAG.
    void
    Sets the knowledge used in search.
    void
    setLeaveOutFinalOrientation(boolean ablationLeaveOutFinalOrientation)
    Sets whether to leave out the final orientation in the search algorithm.
    void
    setMaxPathLength(int maxPathLength)
    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 field seed.
    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 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.
      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.
    • 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.
    • setDoDiscriminatingPathTailRule

      public void setDoDiscriminatingPathTailRule(boolean doDiscriminatingPathTailRule)
      Sets whether to use the discriminating path tail rule for GRaSP.
      Parameters:
      doDiscriminatingPathTailRule - True, if so.
    • setDoDiscriminatingPathColliderRule

      public void setDoDiscriminatingPathColliderRule(boolean doDiscriminatingPathColliderRule)
      Sets whether to use the discriminating path collider rule for GRaSP.
      Parameters:
      doDiscriminatingPathColliderRule - 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.
    • setLeaveOutFinalOrientation

      public void setLeaveOutFinalOrientation(boolean ablationLeaveOutFinalOrientation)
      Sets whether to leave out the final orientation in the search algorithm.
      Parameters:
      ablationLeaveOutFinalOrientation - true if the final orientation should be left out, false otherwise.
    • setSepsetFinderMethod

      public void setSepsetFinderMethod(int sepsetFinderMethod)
      Sets the method for finding sepsets in the GraspFci class.
      Parameters:
      sepsetFinderMethod - the method for finding sepsets