Class Fcit

java.lang.Object
edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.Fcit
All Implemented Interfaces:
Algorithm, LatentStructureAlgorithm, ReturnsBootstrapGraphs, TakesCovarianceMatrix, AcceptsKnowledge, HasParameters, TakesIndependenceWrapper, TakesScoreWrapper, TetradSerializable, Serializable

This class represents the FCI Targeted Testing (FCIT) algorithm, which is variant of the *-FCI algorithm for learning causal structures from observational data using the BOSS algorithm as an initial CPDAG and using all score-based steps afterward.

Thoroughness settings. The underlying search now exposes a set of knobs that trade completeness for speed. Every one of them defaults to the full algorithm, so this wrapper leaves them alone; the runSearch method carries a commented block showing each knob at its default with a note on what turning it down costs. The output-identical optimizations (legality memo, negative sweep cache, independence-query cache) are always on and need no configuration: the first two are unconditional inside the search, and the third is the CachedIndependenceQueries wrap performed below.

None of the thoroughness knobs are registered as Params constants, deliberately: turning one of them down changes what the algorithm is guaranteed to find, and that is a decision to make in code with the reason recorded, not a checkbox in a GUI. To promote one anyway, add a constant to Params, a description to the parameter properties file, a line to getParameters(), and replace the commented setter with a parameters.get... call.

Author:
josephramsey
See Also:
  • Constructor Details

    • Fcit

      public Fcit()
      This class represents a FCIT algorithm.

      The FCIT algorithm is a bootstrap algorithm that runs a search algorithm to find a graph structure based on a given data set and parameters. It is a subclass of the Abstract BootstrapAlgorithm class and implements the Algorithm interface.

      See Also:
    • Fcit

      public Fcit(IndependenceWrapper test, ScoreWrapper score)
      FCIT is a class that represents a FCIT algorithm.

      The FCIT algorithm is a bootstrap algorithm that runs a search algorithm to find a graph structure based on a given data set and parameters. It is a subclass of the AbstractBootstrapAlgorithm class and implements the Algorithm interface.

      Parameters:
      test - The independence test to use.
      score - The score to use.
      See Also:
  • Method Details

    • runSearch

      public Graph runSearch(DataModel dataModel, Parameters parameters) throws InterruptedException
      Runs the search algorithm to find a graph structure based on a given data model and parameters.
      Parameters:
      dataModel - The data model to use for the search algorithm.
      parameters - The parameters to configure the search algorithm.
      Returns:
      The resulting graph structure.
      Throws:
      IllegalArgumentException - if the time lag is greater than 0 and the data model is not an instance of DataSet.
      InterruptedException
    • getComparisonGraph

      public Graph getComparisonGraph(Graph graph)
      Retrieves a comparison graph by transforming a true directed graph into a partially directed graph (PAG).
      Specified by:
      getComparisonGraph in interface Algorithm
      Parameters:
      graph - The true directed graph, if there is one.
      Returns:
      The comparison graph.
    • getDescription

      public String getDescription()
      Returns a short, one-line description of this algorithm. The description is generated by concatenating the descriptions of the test and score objects associated with this algorithm.
      Specified by:
      getDescription in interface Algorithm
      Returns:
      The description of this algorithm.
    • getDataType

      public DataType getDataType()
      Retrieves the data type required by the search algorithm.
      Specified by:
      getDataType in interface Algorithm
      Returns:
      The data type required by the search algorithm.
    • getParameters

      public List<String> getParameters()
      Retrieves the list of parameters used by the algorithm.

      The thoroughness knobs of runSearch(DataModel, Parameters) are intentionally absent: each of them changes what the algorithm is guaranteed to find, which is a decision that belongs in code next to its justification rather than in a settings dialog. To expose one, add a Params constant, a description in the parameter properties file, a line here, and a parameters.get... call in place of the commented setter.

      Specified by:
      getParameters in interface HasParameters
      Returns:
      The list of parameters used by the algorithm.
    • getKnowledge

      public Knowledge getKnowledge()
      Retrieves the knowledge object associated with this method.
      Specified by:
      getKnowledge in interface AcceptsKnowledge
      Returns:
      The knowledge object.
    • setKnowledge

      public void setKnowledge(Knowledge knowledge)
      Sets the knowledge object associated with this method.
      Specified by:
      setKnowledge in interface AcceptsKnowledge
      Parameters:
      knowledge - the knowledge object to be set
    • getScoreWrapper

      public ScoreWrapper getScoreWrapper()
      Retrieves the ScoreWrapper object associated with this method.
      Specified by:
      getScoreWrapper in interface TakesScoreWrapper
      Returns:
      The ScoreWrapper object associated with this method.
    • setScoreWrapper

      public void setScoreWrapper(ScoreWrapper score)
      Sets the score wrapper for the algorithm.
      Specified by:
      setScoreWrapper in interface TakesScoreWrapper
      Parameters:
      score - the score wrapper.
    • getIndependenceWrapper

      public IndependenceWrapper getIndependenceWrapper()
      Description copied from interface: TakesIndependenceWrapper
      Returns the independence wrapper.
      Specified by:
      getIndependenceWrapper in interface TakesIndependenceWrapper
      Returns:
      the independence wrapper.
    • setIndependenceWrapper

      public void setIndependenceWrapper(IndependenceWrapper independenceWrapper)
      Description copied from interface: TakesIndependenceWrapper
      Sets the independence wrapper.
      Specified by:
      setIndependenceWrapper in interface TakesIndependenceWrapper
      Parameters:
      independenceWrapper - the independence wrapper.