Class LegalCpdag

java.lang.Object
edu.cmu.tetrad.algcomparison.statistic.LegalCpdag
All Implemented Interfaces:
Statistic, Serializable

public class LegalCpdag extends Object implements Statistic
The LegalCpdag class implements the Statistic interface and provides methods to evaluate whether an estimated graph is a Legal CPDAG. A Legal CPDAG is determined based on the structure of the estimated graph.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new instance of the LegalCpdag class, representing a statistic used to evaluate whether an estimated graph is a Legal CPDAG.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the abbreviation "CPDAG", representing a Legal CPDAG.
    Provides a description of the output indicating whether the estimated graph is a Legal CPDAG.
    double
    getNormValue(double value)
    Returns the normalized value for the given input.
    double
    getValue(Graph trueGraph, Graph estGraph, DataModel dataModel, Parameters parameters)
    Calculates the value indicating whether the estimated graph is a Legal CPDAG (1.0) or not (0.0).

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface edu.cmu.tetrad.algcomparison.statistic.Statistic

    getValue, getValue, getValue
  • Constructor Details

    • LegalCpdag

      public LegalCpdag()
      Constructs a new instance of the LegalCpdag class, representing a statistic used to evaluate whether an estimated graph is a Legal CPDAG.
  • Method Details

    • getAbbreviation

      public String getAbbreviation()
      Returns the abbreviation "CPDAG", representing a Legal CPDAG.
      Specified by:
      getAbbreviation in interface Statistic
      Returns:
      a string abbreviation "CPDAG"
    • getDescription

      public String getDescription()
      Provides a description of the output indicating whether the estimated graph is a Legal CPDAG.
      Specified by:
      getDescription in interface Statistic
      Returns:
      a string description stating "1 if the estimated graph is Legal CPDAG, 0 if not"
    • getValue

      public double getValue(Graph trueGraph, Graph estGraph, DataModel dataModel, Parameters parameters)
      Calculates the value indicating whether the estimated graph is a Legal CPDAG (1.0) or not (0.0).
      Specified by:
      getValue in interface Statistic
      Parameters:
      trueGraph - the true graph, not used in this implementation
      estGraph - the estimated graph to be checked for being a Legal CPDAG
      dataModel - the data model, not used in this implementation
      parameters - the parameters, not used in this implementation
      Returns:
      1.0 if the estimated graph is a Legal CPDAG, 0.0 otherwise
    • getNormValue

      public double getNormValue(double value)
      Returns the normalized value for the given input. This method currently returns the input value as it is, without any modifications.
      Specified by:
      getNormValue in interface Statistic
      Parameters:
      value - the input value to be normalized
      Returns:
      the normalized value, which is the same as the input value