Class SpFci
java.lang.Object
edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.SpFci
- All Implemented Interfaces:
Algorithm,LatentStructureAlgorithm,ReturnsBootstrapGraphs,TakesCovarianceMatrix,HasKnowledge,HasParameters,TakesIndependenceWrapper,TakesScoreWrapper,TetradSerializable,Serializable
@Algorithm(name="SP-FCI",
command="spfci",
algoType=allow_latent_common_causes)
@Bootstrapping
public class SpFci
extends AbstractBootstrapAlgorithm
implements Algorithm, TakesScoreWrapper, TakesIndependenceWrapper, HasKnowledge, ReturnsBootstrapGraphs, TakesCovarianceMatrix, LatentStructureAlgorithm
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 modelvoidSets the IndependenceWrapper object for the algorithm.voidsetKnowledge(Knowledge knowledge) Sets the knowledge object associated with this algorithm.voidsetScoreWrapper(ScoreWrapper score) Sets the ScoreWrapper object for the algorithm.Methods inherited from class edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
getBootstrapGraphs, searchMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getComparisonGraphin 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:
getDescriptionin interfaceAlgorithm- Returns:
- The description of this algorithm.
-
getDataType
Returns the data type that the search requires, whether continuous, discrete, or mixed.- Specified by:
getDataTypein interfaceAlgorithm- Returns:
- The DataType of this algorithm.
-
getParameters
Returns the list of parameters used by the method.- Specified by:
getParametersin interfaceHasParameters- Returns:
- A List of strings representing the parameters used by the method.
-
getKnowledge
Retrieves the knowledge object associated with this algorithm.- Specified by:
getKnowledgein interfaceHasKnowledge- Returns:
- The knowledge object.
-
setKnowledge
Sets the knowledge object associated with this algorithm.- Specified by:
setKnowledgein interfaceHasKnowledge- Parameters:
knowledge- The knowledge object to be set.
-
getIndependenceWrapper
Retrieves the IndependenceWrapper associated with this algorithm.- Specified by:
getIndependenceWrapperin interfaceTakesIndependenceWrapper- Returns:
- The IndependenceWrapper object.
-
setIndependenceWrapper
Sets the IndependenceWrapper object for the algorithm.- Specified by:
setIndependenceWrapperin interfaceTakesIndependenceWrapper- Parameters:
test- the IndependenceWrapper object to be set.
-
getScoreWrapper
Retrieves the ScoreWrapper object associated with this algorithm.- Specified by:
getScoreWrapperin interfaceTakesScoreWrapper- Returns:
- The ScoreWrapper object.
-
setScoreWrapper
Sets the ScoreWrapper object for the algorithm.- Specified by:
setScoreWrapperin interfaceTakesScoreWrapper- Parameters:
score- the score wrapper.
-