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
ConstructorsConstructorDescriptionGraphScore(double adjPrecision, double adjRecall, double ahdPrecision, double ahdRecall, int tpAdj, int fpAdj, int fnAdj, int tpAhd, int fpAhd, int fnAhd) Creates an instance of aGraphScorerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleadjF1()F1 score for adjacency recovery.doubleReturns the value of theadjPrecisionrecord component.doubleReturns the value of theadjRecallrecord component.doubleahdF1()F1 score for arrowhead recovery.doubleReturns the value of theahdPrecisionrecord component.doubleReturns the value of theahdRecallrecord component.final booleanIndicates whether some other object is "equal to" this one.intfnAdj()Returns the value of thefnAdjrecord component.intfnAhd()Returns the value of thefnAhdrecord component.intfpAdj()Returns the value of thefpAdjrecord component.intfpAhd()Returns the value of thefpAhdrecord component.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.inttpAdj()Returns the value of thetpAdjrecord component.inttpAhd()Returns the value of thetpAhdrecord component.
-
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 aGraphScorerecord class.- Parameters:
adjPrecision- the value for theadjPrecisionrecord componentadjRecall- the value for theadjRecallrecord componentahdPrecision- the value for theahdPrecisionrecord componentahdRecall- the value for theahdRecallrecord componenttpAdj- the value for thetpAdjrecord componentfpAdj- the value for thefpAdjrecord componentfnAdj- the value for thefnAdjrecord componenttpAhd- the value for thetpAhdrecord componentfpAhd- the value for thefpAhdrecord componentfnAhd- the value for thefnAhdrecord 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
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
adjPrecision
public double adjPrecision()Returns the value of theadjPrecisionrecord component.- Returns:
- the value of the
adjPrecisionrecord component
-
adjRecall
-
ahdPrecision
public double ahdPrecision()Returns the value of theahdPrecisionrecord component.- Returns:
- the value of the
ahdPrecisionrecord component
-
ahdRecall
-
tpAdj
-
fpAdj
-
fnAdj
-
tpAhd
-
fpAhd
-
fnAhd
-