Package edu.cmu.tetrad.search
Class Fcit
java.lang.Object
edu.cmu.tetrad.search.Fcit
- All Implemented Interfaces:
IGraphSearch
The FCI Targeted Testing (FCIT) algorithm implements a search algorithm for learning the structure of a graphical
model from observational data with latent variables. The algorithm uses the BOSS or GRaSP algorithm to get an initial
CPDAG. Then it uses scoring steps to infer some unshielded colliders in the graph, then finishes with a testing step
to remove extra edges and orient more unshielded colliders. Finally, the final FCI orientation is applied to the
graph.
- Author:
- josephramsey
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration representing different start options. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsearch()Run the search and return a PAG.voidsetCompleteRuleSetUsed(boolean completeRuleSetUsed) Sets whether the Zhang complete rule set should be used; false if only R1-R4 (the rule set of the original FCI) should be used.voidsetDepth(int depth) Sets the depth of search, which is the maximum number of variables conditioned on in any test.voidsetKnowledge(Knowledge knowledge) Sets the knowledge used in search.voidsetNumStarts(int numStarts) Sets the number of starts for BOSS.voidsetReplicatingGraph(boolean replicatingGraph) Sets the flag indicating whether the graph should be replicated during the search process.voidsetStartWith(Fcit.START_WITH startWith) Sets the algorithm to use to get the initial CPDAG.voidsetSuperVerbose(boolean superVerbose) Sets the verbosity level of the search algorithm.voidsetUseBes(boolean useBes) Sets whether to use the BES (Backward Elimination Search) algorithm during the search.voidsetUseDataOrder(boolean useDataOrder) Sets the flag indicating whether to use data order.voidsetVerbose(boolean verbose) True, just in case good and restored changes are printed.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.IGraphSearch
getTest, setTest
-
Constructor Details
-
Fcit
FCIT constructor. Initializes a new object of the FCIT search algorithm with the given IndependenceTest and Score object.In this constructor, we will use BOSS or GRaSP internally to infer an initial CPDAG and a valid order of the variables. This is the default behavior of the FCIT algorithm.
- Parameters:
test- The IndependenceTest object to be used for testing independence between variables.score- The Score object to be used for scoring DAGs.- Throws:
NullPointerException- if the score is null.
-
-
Method Details
-
search
Run the search and return a PAG.- Specified by:
searchin interfaceIGraphSearch- Returns:
- The PAG.
- Throws:
InterruptedException- if any
-
setStartWith
Sets the algorithm to use to get the initial CPDAG.- Parameters:
startWith- the algorithm to use to get the initial CPDAG.
-
setKnowledge
Sets the knowledge used in search.- Parameters:
knowledge- This knowledge.
-
setSuperVerbose
public void setSuperVerbose(boolean superVerbose) Sets the verbosity level of the search algorithm.- Parameters:
superVerbose- true to enable superVerbose mode, false to disable it
-
setVerbose
public void setVerbose(boolean verbose) True, just in case good and restored changes are printed. The algorithm always moves to a legal PAG; if it doesn't, it is restored to the previous PAG, and a "restored" message is printed. Otherwise, a "good" message is printed.- Parameters:
verbose- True if changes to the graph should be printed.
-
setNumStarts
public void setNumStarts(int numStarts) Sets the number of starts for BOSS.- Parameters:
numStarts- The number of starts.
-
setUseBes
public void setUseBes(boolean useBes) Sets whether to use the BES (Backward Elimination Search) algorithm during the search.- Parameters:
useBes- true to use the BES algorithm, false otherwise
-
setUseDataOrder
public void setUseDataOrder(boolean useDataOrder) Sets the flag indicating whether to use data order.- Parameters:
useDataOrder-trueif the data order should be used,falseotherwise.
-
setCompleteRuleSetUsed
public void setCompleteRuleSetUsed(boolean completeRuleSetUsed) Sets whether the Zhang complete rule set should be used; false if only R1-R4 (the rule set of the original FCI) should be used. False by default.- Parameters:
completeRuleSetUsed- True for the complete Zhang rule set.
-
setDepth
public void setDepth(int depth) Sets the depth of search, which is the maximum number of variables conditioned on in any test.- Parameters:
depth- This maximum.
-
setReplicatingGraph
public void setReplicatingGraph(boolean replicatingGraph) Sets the flag indicating whether the graph should be replicated during the search process.- Parameters:
replicatingGraph- true to enable graph replication, false otherwise.
-