Class Rfci

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

public final class Rfci extends Object implements IGraphSearch

Implements the Really Fast Causal Inference (RFCI) algorithm, which aims to do a correct inference of inferrable causal structure under the assumption that unmeasured common causes of variables in the data may exist. The graph returned is slightly different from the partial ancestral graph (PAG) returned by the FCI algorithm. The goal of of the algorithm is to avoid certain expensive steps in the FCI procedure in a correct way. This was introduced here:

Colombo, D., Maathuis, M. H., Kalisch, M., & Richardson, T. S. (2012). Learning high-dimensional directed acyclic graphs with latent and selection variables. The Annals of Statistics, 294-321.

This class is configured to respect knowledge of forbidden and required edges, including knowledge of temporal tiers.

Author:
Erin Korber, June 2004, Alex Smith, December 2008, josephramsey, Choh-Man Teng
See Also:
  • Constructor Details

    • Rfci

      public Rfci(IndependenceTest independenceTest)
      Constructs a new RFCI search for the given independence test and background knowledge.
    • Rfci

      public Rfci(IndependenceTest independenceTest, List<Node> searchVars)
      Constructs a new RFCI search for the given independence test and background knowledge and a list of variables to search over.
  • Method Details

    • search

      public Graph search()
      Runs the search and returns the RFCI PAG.
      Specified by:
      search in interface IGraphSearch
      Returns:
      This PAG.
    • search

      public Graph search(List<Node> nodes)
      Searches of a specific sublist of nodes.
      Parameters:
      nodes - The sublist.
      Returns:
      The RFCI PAG
    • search

      public Graph search(IFas fas, List<Node> nodes)
      Runs the search and returns the RFCI PAG.
      Parameters:
      fas - The type of FAS to use for the initial step.
      nodes - The nodes to search over.
      Returns:
      The RFCI PAG.
    • setDepth

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

      public long getElapsedTime()
      Returns the elapsed time of the search.
      Returns:
      This time.
    • getSepsets

      public SepsetMap getSepsets()
      Returns the map from node pairs to sepsets found in search.
      Returns:
      This map.
    • getKnowledge

      public Knowledge getKnowledge()
      Returns the knowledge used in search.
      Returns:
      This knowledge.
    • setKnowledge

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

      public int getMaxPathLength()
      Returns the maximum length of any discriminating path, or -1 of unlimited.
      Returns:
      This number.
    • setMaxPathLength

      public void setMaxPathLength(int maxPathLength)
      Sets the maximum path length for discriminating paths.
      Parameters:
      maxPathLength - the maximum length of any discriminating path, or -1 if unlimited.
    • isVerbose

      public boolean isVerbose()
      Returns whether verbose output should be printed.
      Returns:
      True, if so.
    • setVerbose

      public void setVerbose(boolean verbose)
      Sets whether verbose output is printed.
      Parameters:
      verbose - True, if so.
    • getIndependenceTest

      public IndependenceTest getIndependenceTest()
      Returns the independence test.
      Returns:
      This test.