Package edu.cmu.tetrad.search
Class LvLite
java.lang.Object
edu.cmu.tetrad.search.LvLite
- All Implemented Interfaces:
IGraphSearch
The LV-Lite algorithm implements the IGraphSearch interface and represents a search algorithm for learning the
structure of a graphical model from observational data.
This class provides methods for running the search algorithm and obtaining the learned pattern as a PAG (Partially Annotated Graph).
- Author:
- josephramsey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsearch()Run the search and return s a PAG.voidsetCompleteRuleSetUsed(boolean completeRuleSetUsed) Sets whether the complete rule set should be used during the search algorithm.voidsetDoDiscriminatingPathRule(boolean doDiscriminatingPathRule) Sets whether the search algorithm should use the Discriminating Path Rule.voidsetKnowledge(Knowledge knowledge) Sets the knowledge used in search.voidsetNumStarts(int numStarts) Sets the number of starts for BOSS.voidsetResolveAlmostCyclicPaths(boolean resolveAlmostCyclicPaths) Sets whether the search algorithm should resolve almost cyclic paths.voidsetUseBes(boolean useBes) Sets whether to use the BES (Backward Elimination Search) algorithm during the search.voidsetUseDataOrder(boolean useDataOrder) Sets whether the search algorithm should use the order of the data set during the search.voidsetVerbose(boolean verbose) Sets the verbosity level of the search algorithm.
-
Constructor Details
-
LvLite
LvLite constructor. Initializes a new object of LvLite search algorithm with the given IndependenceTest and Score object.- Parameters:
score- The Score object to be used for scoring DAGs.- Throws:
NullPointerException- if score is null.
-
-
Method Details
-
search
Run the search and return s a PAG.- Specified by:
searchin interfaceIGraphSearch- Returns:
- The PAG.
-
setKnowledge
Sets the knowledge used in search.- Parameters:
knowledge- This knowledge.
-
setCompleteRuleSetUsed
public void setCompleteRuleSetUsed(boolean completeRuleSetUsed) Sets whether the complete rule set should be used during the search algorithm. By default, the complete rule set is not used.- Parameters:
completeRuleSetUsed- true if the complete rule set should be used, false otherwise
-
setVerbose
public void setVerbose(boolean verbose) Sets the verbosity level of the search algorithm.- Parameters:
verbose- true to enable verbose mode, false to disable it
-
setNumStarts
public void setNumStarts(int numStarts) Sets the number of starts for BOSS.- Parameters:
numStarts- The number of starts.
-
setUseDataOrder
public void setUseDataOrder(boolean useDataOrder) Sets whether the search algorithm should use the order of the data set during the search.- Parameters:
useDataOrder- true if the algorithm should use the data order, false otherwise
-
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
-
setDoDiscriminatingPathRule
public void setDoDiscriminatingPathRule(boolean doDiscriminatingPathRule) Sets whether the search algorithm should use the Discriminating Path Rule.- Parameters:
doDiscriminatingPathRule- true if the Discriminating Path Rule should be used, false otherwise
-
setResolveAlmostCyclicPaths
public void setResolveAlmostCyclicPaths(boolean resolveAlmostCyclicPaths) Sets whether the search algorithm should resolve almost cyclic paths.- Parameters:
resolveAlmostCyclicPaths- true to resolve almost cyclic paths, false otherwise
-