StructuralMetrics.f_score
- StructuralMetrics.f_score()
F1-score at the arc/edge level: harmonic mean of precision and recall.
- Returns:
F1-score in [0, 1].
- Return type:
float
Example
import pyagrum as gum
ref = gum.fastDAG("A->B->C;A->D")
test = gum.fastDAG("A->B;C->B;A->D") # B->C is reversed
sm = gum.StructuralMetrics()
sm.compare(ref, test)
sm.f_score() # harmonic mean of precision and recall
# 0.8
Class