Class Ccd

java.lang.Object
edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.Ccd
All Implemented Interfaces:
Algorithm, LatentStructureAlgorithm, ReturnsBootstrapGraphs, TakesCovarianceMatrix, AcceptsKnowledge, HasParameters, TakesIndependenceWrapper, TetradSerializable, Serializable

  • Constructor Details

    • Ccd

      public Ccd()
      Constructs a new CCD algorithm.
    • Ccd

      public Ccd(IndependenceWrapper test)
      Constructs a new CCD algorithm with the given independence test.
      Parameters:
      test - the independence test
  • Method Details

    • runSearch

      public Graph runSearch(DataModel dataModel, Parameters parameters) throws InterruptedException
      Runs the CCD (Cyclic Causal Discovery) search algorithm on the given data set using the specified parameters.
      Parameters:
      dataModel - the data set to search on
      parameters - the parameters for the search algorithm
      Returns:
      the resulting graph from the search
      Throws:
      InterruptedException
    • getComparisonGraph

      public Graph getComparisonGraph(Graph graph)
      Retrieves the comparison graph for the given true directed graph: the cyclic PAG that 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 CCD badly - a perfect run scores about 0.39 endpoint-exact on random 8-node, 10-edge cyclic graphs.
      Specified by:
      getComparisonGraph in interface Algorithm
      Parameters:
      graph - The true directed graph, possibly cyclic.
      Returns:
      The cyclic PAG of the true graph's d-separation equivalence class.
      See Also:
    • getDescription

      public String getDescription()
      Returns a short, one-line description of this algorithm. This description will be printed in the report.
      Specified by:
      getDescription in interface Algorithm
      Returns:
      The description of this algorithm.
    • getDataType

      public DataType getDataType()
      Retrieves the data type that the search requires.
      Specified by:
      getDataType in interface Algorithm
      Returns:
      The data type required by the search.
    • getParameters

      public List<String> getParameters()
      Retrieves the parameters for the search algorithm. This method combines the parameters obtained from the underlying test with additional parameters specific to the CCD (Cyclic Causal Discovery) algorithm.
      Specified by:
      getParameters in interface HasParameters
      Returns:
      A list of String names for parameters.
    • getIndependenceWrapper

      public IndependenceWrapper getIndependenceWrapper()
      Returns the IndependenceWrapper object associated with this instance.
      Specified by:
      getIndependenceWrapper in interface TakesIndependenceWrapper
      Returns:
      the IndependenceWrapper object
    • setIndependenceWrapper

      public void setIndependenceWrapper(IndependenceWrapper independenceWrapper)
      Updates the independence wrapper for this algorithm.
      Specified by:
      setIndependenceWrapper in interface TakesIndependenceWrapper
      Parameters:
      independenceWrapper - the independence wrapper to set
    • getKnowledge

      public Knowledge getKnowledge()
      Retrieves the knowledge object associated with this instance. The knowledge object typically contains prior knowledge or constraints to guide the algorithm's behavior.
      Specified by:
      getKnowledge in interface AcceptsKnowledge
      Returns:
      the Knowledge object associated with this instance
    • setKnowledge

      public void setKnowledge(Knowledge knowledge)
      Sets the knowledge object for this instance. The knowledge object typically contains prior assumptions or constraints to guide the algorithm's behavior.
      Specified by:
      setKnowledge in interface AcceptsKnowledge
      Parameters:
      knowledge - the Knowledge object to set; this object encapsulates domain-specific knowledge or constraints relevant to the algorithm.