Class Cdnod

java.lang.Object
edu.cmu.tetrad.search.Cdnod
All Implemented Interfaces:
IGraphSearch

public final class Cdnod extends Object implements IGraphSearch
The Cdnod class implements the causal discovery algorithm for detecting changing dependencies with respect to a change index variable in a dataset.

The algorithm is capable of orienting edges in a graph based on statistical tests, knowledge constraints, and user-defined parameters. It also supports conservative decision-making and constraints on collider orientations.

This class extends the functionality of IGraphSearch and provides methods for configuring the statistical independence test, working dataset, maximum conditioning depth, and timeout settings.

Key Features:

  • Searches for a graph representing causal structure based on a change index variable.
  • Provides support for collider orientation with both conservative logic and maximum p-margin decisions.
  • Enables customization of constraints using a Knowledge object.
  • Supports timeout settings to limit the duration of computations.
  • Method Details

    • search

      public Graph search() throws InterruptedException
      Description copied from interface: IGraphSearch
      Runs the search and returns a graph.
      Specified by:
      search in interface IGraphSearch
      Returns:
      The discovered graph.
      Throws:
      InterruptedException - if any.
    • getTest

      public IndependenceTest getTest()
      Description copied from interface: IGraphSearch
      Gets the test used by the search.
      Specified by:
      getTest in interface IGraphSearch
      Returns:
      The test used by the search.
    • setTest

      public void setTest(IndependenceTest newTest)
      Description copied from interface: IGraphSearch
      Sets the test to be used by the search. The list of variables of the new proposed test must be equal to the list of variables of the existing test.
      Specified by:
      setTest in interface IGraphSearch
      Parameters:
      newTest - The test to be used by the search.
    • setDataWithC

      public void setDataWithC(DataSet dataWithC)
      Sets the dataset to be used in this instance.
      Parameters:
      dataWithC - the dataset to be assigned
    • setDataAndIndex

      public void setDataAndIndex(DataSet dataX, double[] cIndex, String cName)
      Updates the internal dataset by appending a change index as the last column. This method modifies the data to include an additional column (defined by the provided change index and name) and stores the updated dataset for further processing.
      Parameters:
      dataX - the original dataset to which the change index will be appended
      cIndex - an array representing the change index values to be incorporated into the dataset
      cName - the name of the new column that will represent the change index
    • setTimeoutMs

      public void setTimeoutMs(long timeoutMs)
      Sets the timeout value in milliseconds for this instance. This value determines the maximum time allowed for certain operations before they are interrupted or terminated.
      Parameters:
      timeoutMs - the timeout in milliseconds