Record Class StructuralGraphScorer.GraphScore

java.lang.Object
java.lang.Record
edu.cmu.tetrad.search.harness.tsbi.StructuralGraphScorer.GraphScore
Record Components:
adjPrecision - adjacency precision in [0, 1] (or NaN if undefined).
adjRecall - adjacency recall in [0, 1] (or NaN if undefined).
ahdPrecision - arrowhead precision in [0, 1] (or NaN if undefined).
ahdRecall - arrowhead recall in [0, 1] (or NaN if undefined).
tpAdj - true-positive adjacency count.
fpAdj - false-positive adjacency count.
fnAdj - false-negative adjacency count.
tpAhd - true-positive arrowhead count.
fpAhd - false-positive arrowhead count.
fnAhd - false-negative arrowhead count.
Enclosing class:
StructuralGraphScorer

public static record StructuralGraphScorer.GraphScore(double adjPrecision, double adjRecall, double ahdPrecision, double ahdRecall, int tpAdj, int fpAdj, int fnAdj, int tpAhd, int fpAhd, int fnAhd) extends Record
Immutable result of a structural graph scoring comparison.
Author:
josephramsey
  • Constructor Summary

    Constructors
    Constructor
    Description
    GraphScore(double adjPrecision, double adjRecall, double ahdPrecision, double ahdRecall, int tpAdj, int fpAdj, int fnAdj, int tpAhd, int fpAhd, int fnAhd)
    Creates an instance of a GraphScore record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    F1 score for adjacency recovery.
    double
    Returns the value of the adjPrecision record component.
    double
    Returns the value of the adjRecall record component.
    double
    F1 score for arrowhead recovery.
    double
    Returns the value of the ahdPrecision record component.
    double
    Returns the value of the ahdRecall record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the fnAdj record component.
    int
    Returns the value of the fnAhd record component.
    int
    Returns the value of the fpAdj record component.
    int
    Returns the value of the fpAhd record component.
    final int
    Returns a hash code value for this object.
    Returns a string representation of this record class.
    int
    Returns the value of the tpAdj record component.
    int
    Returns the value of the tpAhd record component.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • GraphScore

      public GraphScore(double adjPrecision, double adjRecall, double ahdPrecision, double ahdRecall, int tpAdj, int fpAdj, int fnAdj, int tpAhd, int fpAhd, int fnAhd)
      Creates an instance of a GraphScore record class.
      Parameters:
      adjPrecision - the value for the adjPrecision record component
      adjRecall - the value for the adjRecall record component
      ahdPrecision - the value for the ahdPrecision record component
      ahdRecall - the value for the ahdRecall record component
      tpAdj - the value for the tpAdj record component
      fpAdj - the value for the fpAdj record component
      fnAdj - the value for the fnAdj record component
      tpAhd - the value for the tpAhd record component
      fpAhd - the value for the fpAhd record component
      fnAhd - the value for the fnAhd record component
  • Method Details

    • adjF1

      public double adjF1()
      F1 score for adjacency recovery.
      Returns:
      harmonic mean of adjacency precision and recall, or NaN.
    • ahdF1

      public double ahdF1()
      F1 score for arrowhead recovery.
      Returns:
      harmonic mean of arrowhead precision and recall, or NaN.
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • adjPrecision

      public double adjPrecision()
      Returns the value of the adjPrecision record component.
      Returns:
      the value of the adjPrecision record component
    • adjRecall

      public double adjRecall()
      Returns the value of the adjRecall record component.
      Returns:
      the value of the adjRecall record component
    • ahdPrecision

      public double ahdPrecision()
      Returns the value of the ahdPrecision record component.
      Returns:
      the value of the ahdPrecision record component
    • ahdRecall

      public double ahdRecall()
      Returns the value of the ahdRecall record component.
      Returns:
      the value of the ahdRecall record component
    • tpAdj

      public int tpAdj()
      Returns the value of the tpAdj record component.
      Returns:
      the value of the tpAdj record component
    • fpAdj

      public int fpAdj()
      Returns the value of the fpAdj record component.
      Returns:
      the value of the fpAdj record component
    • fnAdj

      public int fnAdj()
      Returns the value of the fnAdj record component.
      Returns:
      the value of the fnAdj record component
    • tpAhd

      public int tpAhd()
      Returns the value of the tpAhd record component.
      Returns:
      the value of the tpAhd record component
    • fpAhd

      public int fpAhd()
      Returns the value of the fpAhd record component.
      Returns:
      the value of the fpAhd record component
    • fnAhd

      public int fnAhd()
      Returns the value of the fnAhd record component.
      Returns:
      the value of the fnAhd record component