Class SpFci
java.lang.Object
edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.SpFci
- All Implemented Interfaces:
Algorithm
,ReturnsBootstrapGraphs
,TakesCovarianceMatrix
,HasKnowledge
,HasParameters
,TakesIndependenceWrapper
,UsesScoreWrapper
,TetradSerializable
,Serializable
@Algorithm(name="SP-FCI",
command="spfci",
algoType=allow_latent_common_causes)
@Bootstrapping
public class SpFci
extends AbstractBootstrapAlgorithm
implements Algorithm, UsesScoreWrapper, TakesIndependenceWrapper, HasKnowledge, ReturnsBootstrapGraphs, TakesCovarianceMatrix
Adjusts GFCI to use a permutation algorithm (in this case SP) to do the initial steps of finding adjacencies and
unshielded colliders.
GFCI reference is this:
J.M. Ogarrio and P. Spirtes and J. Ramsey, "A Hybrid Causal Search Algorithm for Latent Variable Models," JMLR 2016.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSpFci()
The SpFci class represents a specific algorithm for structural learning called "Conditional Independence Test-based Fast Causal Inference" (SpFci).SpFci
(IndependenceWrapper test, ScoreWrapper score) Constructor for the SpFci class. -
Method Summary
Modifier and TypeMethodDescriptiongetComparisonGraph
(Graph graph) Returns the comparison graph created by converting a true directed graph into a partially directed acyclic graph (PAG).Returns the data type that the search requires, whether continuous, discrete, or mixed.Returns a short, one-line description of this algorithm.Retrieves the IndependenceWrapper associated with this algorithm.Retrieves the knowledge object associated with this algorithm.Returns the list of parameters used by the method.Retrieves the ScoreWrapper object associated with this algorithm.runSearch
(DataModel dataModel, Parameters parameters) Executes a search algorithm to infer the causal graph structure from a given data modelvoid
Sets the IndependenceWrapper object for the algorithm.void
setKnowledge
(Knowledge knowledge) Sets the knowledge object associated with this algorithm.void
setScoreWrapper
(ScoreWrapper score) Sets the ScoreWrapper object 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
-
SpFci
public SpFci()The SpFci class represents a specific algorithm for structural learning called "Conditional Independence Test-based Fast Causal Inference" (SpFci). This class extends the AbstractBootstrapAlgorithm class and implements the Algorithm, UsesScoreWrapper, and TakesIndependenceWrapper interfaces. -
SpFci
Constructor for the SpFci class.- Parameters:
test
- The IndependenceWrapper object to be used for the algorithm.score
- The ScoreWrapper object to be used for the algorithm.
-
-
Method Details
-
runSearch
Executes a search algorithm to infer the causal graph structure from a given data model- Parameters:
dataModel
- The data model representing the observed variables and their relationshipsparameters
- The parameters for the search algorithm- Returns:
- The inferred causal graph structure
- Throws:
InterruptedException
-
getComparisonGraph
Returns the comparison graph created by converting a true directed graph 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 as a partially directed acyclic graph (PAG).
-
getDescription
Returns a short, one-line description of this algorithm. This will be printed in the report.- Specified by:
getDescription
in interfaceAlgorithm
- Returns:
- The description of this algorithm.
-
getDataType
Returns the data type that the search requires, whether continuous, discrete, or mixed.- Specified by:
getDataType
in interfaceAlgorithm
- Returns:
- The DataType of this algorithm.
-
getParameters
Returns the list of parameters used by the method.- Specified by:
getParameters
in interfaceHasParameters
- Returns:
- A List of strings representing the parameters used by the method.
-
getKnowledge
Retrieves the knowledge object associated with this algorithm.- Specified by:
getKnowledge
in interfaceHasKnowledge
- Returns:
- The knowledge object.
-
setKnowledge
Sets the knowledge object associated with this algorithm.- Specified by:
setKnowledge
in interfaceHasKnowledge
- Parameters:
knowledge
- The knowledge object to be set.
-
getIndependenceWrapper
Retrieves the IndependenceWrapper associated with this algorithm.- Specified by:
getIndependenceWrapper
in interfaceTakesIndependenceWrapper
- Returns:
- The IndependenceWrapper object.
-
setIndependenceWrapper
Sets the IndependenceWrapper object for the algorithm.- Specified by:
setIndependenceWrapper
in interfaceTakesIndependenceWrapper
- Parameters:
test
- the IndependenceWrapper object to be set.
-
getScoreWrapper
Retrieves the ScoreWrapper object associated with this algorithm.- Specified by:
getScoreWrapper
in interfaceUsesScoreWrapper
- Returns:
- The ScoreWrapper object.
-
setScoreWrapper
Sets the ScoreWrapper object for the algorithm.- Specified by:
setScoreWrapper
in interfaceUsesScoreWrapper
- Parameters:
score
- the score wrapper.
-