Package edu.cmu.tetrad.search
Class Rfci
java.lang.Object
edu.cmu.tetrad.search.Rfci
- All Implemented Interfaces:
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.
- Version:
- $Id: $Id
- Author:
- Erin Korber, June 2004, Alex Smith, December 2008, josephramsey, Choh-Man Teng
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRfci
(IndependenceTest independenceTest) Constructs a new RFCI search for the given independence test and background knowledge.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 Summary
Modifier and TypeMethodDescriptionlong
Returns the elapsed time of the search.Returns the independence test.Returns the knowledge used in search.int
Returns the maximum length of any discriminating path, or -1 of unlimited.Returns the map from node pairs to sepsets found in search.boolean
Returns whether verbose output should be printed.search()
Runs the search and returns the RFCI PAG.Runs the search and returns the RFCI PAG.Searches of a specific sublist of nodes.void
setDepth
(int depth) Sets the maximum number of variables conditioned on in any test.void
setKnowledge
(Knowledge knowledge) Sets the knowledge used in search.void
setMaxDiscriminatingPathLength
(int maxDiscriminatingPathLength) Sets the maximum length of any discriminating path.void
setVerbose
(boolean verbose) Sets whether verbose output is printed.
-
Constructor Details
-
Rfci
Constructs a new RFCI search for the given independence test and background knowledge.- Parameters:
independenceTest
- aIndependenceTest
object
-
Rfci
Constructs a new RFCI search for the given independence test and background knowledge and a list of variables to search over.- Parameters:
independenceTest
- aIndependenceTest
objectsearchVars
- aList
object
-
-
Method Details
-
search
Runs the search and returns the RFCI PAG.- Specified by:
search
in interfaceIGraphSearch
- Returns:
- This PAG.
- Throws:
InterruptedException
- if any.
-
search
Searches of a specific sublist of nodes.- Parameters:
nodes
- The sublist.- Returns:
- The RFCI PAG
- Throws:
InterruptedException
-
search
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.
- Throws:
InterruptedException
-
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
Returns the map from node pairs to sepsets found in search.- Returns:
- This map.
-
getKnowledge
-
setKnowledge
Sets the knowledge used in search.- Parameters:
knowledge
- This knoweldge.
-
getMaxDiscriminatingPathLength
public int getMaxDiscriminatingPathLength()Returns the maximum length of any discriminating path, or -1 of unlimited.- Returns:
- This number.
-
setMaxDiscriminatingPathLength
public void setMaxDiscriminatingPathLength(int maxDiscriminatingPathLength) Sets the maximum length of any discriminating path.- Parameters:
maxDiscriminatingPathLength
- 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
-