Class BossCcd
java.lang.Object
edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.BossCcd
- All Implemented Interfaces:
Algorithm, LatentStructureAlgorithm, ReturnsBootstrapGraphs, TakesCovarianceMatrix, AcceptsKnowledge, HasParameters, TakesIndependenceWrapper, TakesScoreWrapper, TetradSerializable, Serializable
@Algorithm(name="BOSS-CCD",
command="boss-ccd",
algoType=forbid_latent_common_causes)
@Bootstrapping
@Experimental
public class BossCcd
extends AbstractBootstrapAlgorithm
implements Algorithm, TakesIndependenceWrapper, TakesScoreWrapper, ReturnsBootstrapGraphs, TakesCovarianceMatrix, LatentStructureAlgorithm, AcceptsKnowledge
BOSS-CCD (Cyclic Causal Discovery with a BOSS adjacency superstructure).
Runs BOSS to obtain a CPDAG, then runs Richardson's CCD with the BOSS skeleton as an adjacency superstructure. Both phases require only second-order statistics, so this works from a covariance/correlation matrix alone, unlike non-Gaussian cyclic methods (FASK, Two-Step).
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBossCcd()Constructs a new BOSS-CCD algorithm.BossCcd(IndependenceWrapper test, ScoreWrapper score) Constructs a new BOSS-CCD algorithm with the given independence test and score. -
Method Summary
Modifier and TypeMethodDescriptiongetComparisonGraph(Graph graph) Retrieves the comparison graph for the given true directed graph: the cyclic PAG that BOSS-CCD is meant to recover, not the true graph itself.Retrieves the data type that the search requires.Returns a short, one-line description of this algorithm.Returns the IndependenceWrapper object associated with this instance.Retrieves the knowledge object associated with this instance.Retrieves the parameters for the search algorithm.Returns the ScoreWrapper object associated with this instance.runSearch(DataModel dataModel, Parameters parameters) Runs the BOSS-CCD search algorithm on the given data set using the specified parameters.voidsetIndependenceWrapper(IndependenceWrapper independenceWrapper) Updates the independence wrapper for this algorithm.voidsetKnowledge(Knowledge knowledge) Sets the knowledge object for this instance.voidsetScoreWrapper(ScoreWrapper score) Updates the score wrapper for this algorithm.Methods inherited from class AbstractBootstrapAlgorithm
getBootstrapGraphs, searchMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ReturnsBootstrapGraphs
getBootstrapGraphs
-
Constructor Details
-
BossCcd
public BossCcd()Constructs a new BOSS-CCD algorithm. -
BossCcd
Constructs a new BOSS-CCD algorithm with the given independence test and score.- Parameters:
test- the independence test (CCD phase)score- the score (BOSS phase)
-
-
Method Details
-
runSearch
Runs the BOSS-CCD search algorithm on the given data set using the specified parameters.- Parameters:
dataModel- the data set to search onparameters- the parameters for the search algorithm- Returns:
- the resulting graph from the search
- Throws:
InterruptedException
-
getComparisonGraph
Retrieves the comparison graph for the given true directed graph: the cyclic PAG that BOSS-CCD is meant to recover, not the true graph itself. A cycle makes pairs inseparable that are not adjacent in the true graph (Richardson's "virtual edges"), so those edges belong in the comparison graph and grading against the true graph understates BOSS-CCD badly - a perfect run scores about 0.39 endpoint-exact on random 8-node, 10-edge cyclic graphs.- Specified by:
getComparisonGraphin interfaceAlgorithm- Parameters:
graph- The true directed graph, possibly cyclic.- Returns:
- The cyclic PAG of the true graph's d-separation equivalence class.
- See Also:
-
getDescription
Returns a short, one-line description of this algorithm. This description will be printed in the report.- Specified by:
getDescriptionin interfaceAlgorithm- Returns:
- The description of this algorithm.
-
getDataType
Retrieves the data type that the search requires.- Specified by:
getDataTypein interfaceAlgorithm- Returns:
- The data type required by the search.
-
getParameters
Retrieves the parameters for the search algorithm.- Specified by:
getParametersin interfaceHasParameters- Returns:
- A list of String names for parameters.
-
getIndependenceWrapper
Returns the IndependenceWrapper object associated with this instance.- Specified by:
getIndependenceWrapperin interfaceTakesIndependenceWrapper- Returns:
- the IndependenceWrapper object
-
setIndependenceWrapper
Updates the independence wrapper for this algorithm.- Specified by:
setIndependenceWrapperin interfaceTakesIndependenceWrapper- Parameters:
independenceWrapper- the independence wrapper to set
-
getScoreWrapper
Returns the ScoreWrapper object associated with this instance.- Specified by:
getScoreWrapperin interfaceTakesScoreWrapper- Returns:
- the ScoreWrapper object
-
setScoreWrapper
Updates the score wrapper for this algorithm.- Specified by:
setScoreWrapperin interfaceTakesScoreWrapper- Parameters:
score- the score wrapper to set
-
getKnowledge
Retrieves the knowledge object associated with this instance.- Specified by:
getKnowledgein interfaceAcceptsKnowledge- Returns:
- the
Knowledgeobject associated with this instance
-
setKnowledge
Sets the knowledge object for this instance.- Specified by:
setKnowledgein interfaceAcceptsKnowledge- Parameters:
knowledge- theKnowledgeobject to set
-