Class Fcit

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

public final class Fcit extends Object implements IGraphSearch
The FCI Targeted Testing (FCIT) algorithm implements a search algorithm for learning the structure of a graphical model from observational data with latent variables. The algorithm uses the BOSS or GRaSP algorithm to get an initial CPDAG. Then it uses scoring steps to infer some unshielded colliders in the graph, then finishes with a testing step to remove extra edges and orient more unshielded colliders. Finally, the final FCI orientation is applied to the graph.
Author:
josephramsey
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enumeration representing different start options.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Fcit(IndependenceTest test, Score score)
    FCIT constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Run the search and return a PAG.
    void
    setCompleteRuleSetUsed(boolean completeRuleSetUsed)
    Sets whether the Zhang complete rule set should be used; false if only R1-R4 (the rule set of the original FCI) should be used.
    void
    setDepth(int depth)
    Sets the depth of search, which is the maximum number of variables conditioned on in any test.
    void
    Sets the knowledge used in search.
    void
    setNumStarts(int numStarts)
    Sets the number of starts for BOSS.
    void
    setReplicatingGraph(boolean replicatingGraph)
    Sets the flag indicating whether the graph should be replicated during the search process.
    void
    Sets the algorithm to use to get the initial CPDAG.
    void
    setSuperVerbose(boolean superVerbose)
    Sets the verbosity level of the search algorithm.
    void
    setUseBes(boolean useBes)
    Sets whether to use the BES (Backward Elimination Search) algorithm during the search.
    void
    setUseDataOrder(boolean useDataOrder)
    Sets the flag indicating whether to use data order.
    void
    setVerbose(boolean verbose)
    True, just in case good and restored changes are printed.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface edu.cmu.tetrad.search.IGraphSearch

    getTest, setTest
  • Constructor Details

    • Fcit

      public Fcit(IndependenceTest test, Score score)
      FCIT constructor. Initializes a new object of the FCIT search algorithm with the given IndependenceTest and Score object.

      In this constructor, we will use BOSS or GRaSP internally to infer an initial CPDAG and a valid order of the variables. This is the default behavior of the FCIT algorithm.

      Parameters:
      test - The IndependenceTest object to be used for testing independence between variables.
      score - The Score object to be used for scoring DAGs.
      Throws:
      NullPointerException - if the score is null.
  • Method Details

    • search

      public Graph search() throws InterruptedException
      Run the search and return a PAG.
      Specified by:
      search in interface IGraphSearch
      Returns:
      The PAG.
      Throws:
      InterruptedException - if any
    • setStartWith

      public void setStartWith(Fcit.START_WITH startWith)
      Sets the algorithm to use to get the initial CPDAG.
      Parameters:
      startWith - the algorithm to use to get the initial CPDAG.
    • setKnowledge

      public void setKnowledge(Knowledge knowledge)
      Sets the knowledge used in search.
      Parameters:
      knowledge - This knowledge.
    • setSuperVerbose

      public void setSuperVerbose(boolean superVerbose)
      Sets the verbosity level of the search algorithm.
      Parameters:
      superVerbose - true to enable superVerbose mode, false to disable it
    • setVerbose

      public void setVerbose(boolean verbose)
      True, just in case good and restored changes are printed. The algorithm always moves to a legal PAG; if it doesn't, it is restored to the previous PAG, and a "restored" message is printed. Otherwise, a "good" message is printed.
      Parameters:
      verbose - True if changes to the graph should be printed.
    • setNumStarts

      public void setNumStarts(int numStarts)
      Sets the number of starts for BOSS.
      Parameters:
      numStarts - The number of starts.
    • setUseBes

      public void setUseBes(boolean useBes)
      Sets whether to use the BES (Backward Elimination Search) algorithm during the search.
      Parameters:
      useBes - true to use the BES algorithm, false otherwise
    • setUseDataOrder

      public void setUseDataOrder(boolean useDataOrder)
      Sets the flag indicating whether to use data order.
      Parameters:
      useDataOrder - true if the data order should be used, false otherwise.
    • setCompleteRuleSetUsed

      public void setCompleteRuleSetUsed(boolean completeRuleSetUsed)
      Sets whether the Zhang complete rule set should be used; false if only R1-R4 (the rule set of the original FCI) should be used. False by default.
      Parameters:
      completeRuleSetUsed - True for the complete Zhang rule set.
    • setDepth

      public void setDepth(int depth)
      Sets the depth of search, which is the maximum number of variables conditioned on in any test.
      Parameters:
      depth - This maximum.
    • setReplicatingGraph

      public void setReplicatingGraph(boolean replicatingGraph)
      Sets the flag indicating whether the graph should be replicated during the search process.
      Parameters:
      replicatingGraph - true to enable graph replication, false otherwise.