Class Gfci
java.lang.Object
edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.Gfci
- All Implemented Interfaces:
Algorithm
,ReturnsBootstrapGraphs
,TakesCovarianceMatrix
,HasKnowledge
,HasParameters
,TakesIndependenceWrapper
,UsesScoreWrapper
,TetradSerializable
,Serializable
@Algorithm(name="GFCI",
command="gfci",
algoType=allow_latent_common_causes)
@Bootstrapping
public class Gfci
extends AbstractBootstrapAlgorithm
implements Algorithm, HasKnowledge, UsesScoreWrapper, TakesIndependenceWrapper, ReturnsBootstrapGraphs, TakesCovarianceMatrix
The Gfci class represents the Greedy Fast Causal Inference algorithm.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGfci()
The Gfci class represents the Greedy Fast Causal Inference algorithm.Gfci
(IndependenceWrapper test, ScoreWrapper score) Constructs a new instance of Gfci with the given IndependenceWrapper and ScoreWrapper. -
Method Summary
Modifier and TypeMethodDescriptiongetComparisonGraph
(Graph graph) Retrieves the comparison graph by transforming the true directed graph (if there is one) into a partially directed acyclic graph (PAG).Retrieves the data type required for the search algorithm.Returns a description of the GFCI (Greedy Fast Causal Inference) algorithm using the description of the independence test and score associated with it.Returns the independence wrapper associated with this instance.Retrieves the Knowledge object associated with this instance.Returns a list of parameters used to configure the search algorithm.Retrieves the ScoreWrapper associated with this instance.runSearch
(DataModel dataModel, Parameters parameters) Runs the search algorithm to infer the causal graph given a dataset and specified parameters.void
Sets the independence wrapper for the algorithm.void
setKnowledge
(Knowledge knowledge) Sets the Knowledge object associated with this instance.void
setScoreWrapper
(ScoreWrapper score) Sets the score wrapper for the algorithm.Methods inherited from class edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
getBootstrapGraphs, search
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.cmu.tetrad.algcomparison.algorithm.ReturnsBootstrapGraphs
getBootstrapGraphs
-
Constructor Details
-
Gfci
public Gfci()The Gfci class represents the Greedy Fast Causal Inference algorithm. -
Gfci
Constructs a new instance of Gfci with the given IndependenceWrapper and ScoreWrapper.- Parameters:
test
- The IndependenceWrapper object to associate with this Gfci instance.score
- The ScoreWrapper object to associate with this Gfci instance.
-
-
Method Details
-
runSearch
Runs the search algorithm to infer the causal graph given a dataset and specified parameters.- Parameters:
dataModel
- The dataset containing the observational data.parameters
- The parameters to configure the search algorithm.- Returns:
- The inferred causal graph.
- Throws:
InterruptedException
-
getComparisonGraph
Retrieves the comparison graph by transforming the true directed graph (if there is one) into a partially directed acyclic graph (PAG).- Specified by:
getComparisonGraph
in interfaceAlgorithm
- Parameters:
graph
- The true directed graph, if there is one.- Returns:
- The comparison graph in the form of a partially directed acyclic graph (PAG).
-
getDescription
Returns a description of the GFCI (Greedy Fast Causal Inference) algorithm using the description of the independence test and score associated with it.- Specified by:
getDescription
in interfaceAlgorithm
- Returns:
- The description of the algorithm.
-
getDataType
Retrieves the data type required for the search algorithm.- Specified by:
getDataType
in interfaceAlgorithm
- Returns:
- The data type required for the search algorithm.
-
getParameters
Returns a list of parameters used to configure the search algorithm.- Specified by:
getParameters
in interfaceHasParameters
- Returns:
- The list of parameters used to configure the search algorithm.
-
getKnowledge
Retrieves the Knowledge object associated with this instance.- Specified by:
getKnowledge
in interfaceHasKnowledge
- Returns:
- The Knowledge object associated with this instance.
-
setKnowledge
Sets the Knowledge object associated with this instance.- Specified by:
setKnowledge
in interfaceHasKnowledge
- Parameters:
knowledge
- The Knowledge object to be set.
-
getScoreWrapper
Retrieves the ScoreWrapper associated with this instance.- Specified by:
getScoreWrapper
in interfaceUsesScoreWrapper
- Returns:
- The ScoreWrapper associated with this instance.
-
setScoreWrapper
Sets the score wrapper for the algorithm.- Specified by:
setScoreWrapper
in interfaceUsesScoreWrapper
- Parameters:
score
- the score wrapper.
-
getIndependenceWrapper
Returns the independence wrapper associated with this instance.- Specified by:
getIndependenceWrapper
in interfaceTakesIndependenceWrapper
- Returns:
- The independence wrapper.
-
setIndependenceWrapper
Sets the independence wrapper for the algorithm.- Specified by:
setIndependenceWrapper
in interfaceTakesIndependenceWrapper
- Parameters:
test
- the independence wrapper to set
-