Class CdnodBoss

java.lang.Object
edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
edu.cmu.tetrad.algcomparison.algorithm.oracle.cpdag.CdnodBoss
All Implemented Interfaces:
Algorithm, ReturnsBootstrapGraphs, AcceptsKnowledge, HasParameters, TakesIndependenceWrapper, TakesScoreWrapper, TetradSerializable, Serializable

Algcomparison wrapper for the CD-NOD-BOSS search (CdnodBoss): a BOSS backbone with constraint-based collider orientation applied only to unshielded triples that BOSS leaves fully undirected, followed by Meek closure.

Context variables are the Tier-0 variables of the supplied Knowledge; the search forbids edges into contexts during the BOSS run and forces Context → X for adjacent non-context variables. The constraint-based step requires both a ScoreWrapper (for the BOSS backbone) and an IndependenceWrapper (for sepset derivation), so this wrapper takes both. A tabular DataSet is required; covariance matrices alone are not sufficient for the CI step in general.

Non-standard parameter keys (string keys for now; promote to Params when the algorithm stabilizes):

See Also:
  • Field Details

    • CDNOD_COLLIDER_STYLE

      public static final String CDNOD_COLLIDER_STYLE
      Parameter key selecting the collider orientation style for triples BOSS leaves unresolved: 1 = SEPSETS, 2 = CONSERVATIVE, 3 = MAX_P. Default 1.
      See Also:
    • CDNOD_MAX_P_MARGIN

      public static final String CDNOD_MAX_P_MARGIN
      Parameter key for the MAX_P tie-guard margin. Default 0.0 (classic MAX-P).
      See Also:
    • CDNOD_EXCLUDE_CONTEXTS_FROM_S

      public static final String CDNOD_EXCLUDE_CONTEXTS_FROM_S
      Parameter key: if true, context variables are excluded from conditioning sets in the collider-orientation step, uniformly across styles (including RecursiveBlocking hints). Default false (contexts admissible, per Huang et al. 2020).
      See Also:
  • Constructor Details

    • CdnodBoss

      public CdnodBoss()
      Default constructor. Score and test wrappers must be supplied before use.
    • CdnodBoss

      public CdnodBoss(ScoreWrapper score)
      Constructs the wrapper with a score wrapper for the BOSS backbone.
      Parameters:
      score - the score wrapper.
    • CdnodBoss

      public CdnodBoss(ScoreWrapper score, IndependenceWrapper test)
      Constructs the wrapper with both a score wrapper (for the BOSS backbone) and an independence wrapper (for the collider-orientation step).
      Parameters:
      score - the score wrapper.
      test - the independence wrapper.
  • Method Details

    • getComparisonGraph

      public Graph getComparisonGraph(Graph graph)
      Returns that graph that the result should be compared to.

      Compares against the CPDAG of the true DAG. Note this is slightly conservative for CD-NOD: the algorithm additionally orients Context → X edges that a plain CPDAG may leave undirected, so those orientations are not credited by this comparison graph.

      Specified by:
      getComparisonGraph in interface Algorithm
      Parameters:
      graph - The true directed graph, if there is one.
      Returns:
      The comparison graph.
    • getDescription

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

      public DataType getDataType()
      Description copied from interface: Algorithm
      Returns the data type that the search requires, whether continuous, discrete, or mixed.
      Specified by:
      getDataType in interface Algorithm
      Returns:
      This type.
    • getParameters

      public List<String> getParameters()
      Description copied from interface: HasParameters
      Returns the list of parameter names that are used. These are looked up in ParamMap, so if they're not
      Specified by:
      getParameters in interface HasParameters
      Returns:
      Returns the list of parameter names that are used. These are looked up in ParamMap, so if they're not already defined they'll need to be defined there.
    • getScoreWrapper

      public ScoreWrapper getScoreWrapper()
      Description copied from interface: TakesScoreWrapper
      Returns the score wrapper.
      Specified by:
      getScoreWrapper in interface TakesScoreWrapper
      Returns:
      the score wrapper.
    • setScoreWrapper

      public void setScoreWrapper(ScoreWrapper score)
      Description copied from interface: TakesScoreWrapper
      Sets the score wrapper.
      Specified by:
      setScoreWrapper in interface TakesScoreWrapper
      Parameters:
      score - the score wrapper.
    • getIndependenceWrapper

      public IndependenceWrapper getIndependenceWrapper()
      Description copied from interface: TakesIndependenceWrapper
      Returns the independence wrapper.
      Specified by:
      getIndependenceWrapper in interface TakesIndependenceWrapper
      Returns:
      the independence wrapper.
    • setIndependenceWrapper

      public void setIndependenceWrapper(IndependenceWrapper test)
      Description copied from interface: TakesIndependenceWrapper
      Sets the independence wrapper.
      Specified by:
      setIndependenceWrapper in interface TakesIndependenceWrapper
      Parameters:
      test - the independence wrapper.
    • getKnowledge

      public Knowledge getKnowledge()
      Description copied from interface: AcceptsKnowledge
      Returns a knowledge object.
      Specified by:
      getKnowledge in interface AcceptsKnowledge
      Returns:
      a knowledge object.
    • setKnowledge

      public void setKnowledge(Knowledge knowledge)
      Description copied from interface: AcceptsKnowledge
      Sets a knowledge object.
      Specified by:
      setKnowledge in interface AcceptsKnowledge
      Parameters:
      knowledge - a knowledge object.