def f1.go
import mlbend-metrics@0.1.0.0/main.bend as MlbendMetricsimport Base
313# the harmonic mean of the precision and the recall of the class k
314def f1.go(r: Result<&1, &1, Bad, Nat>, +ys: List<&2, Nat>, +ps: List<&2, Nat>, +k: Nat) -> Result<&1, &1, Bad, F32>:
315 match r:
316 case Done{+n}:
317 f1_of(precision.go(Done{n}, ys, ps, k), recall.go(Done{n}, ys, ps, k))
318 case Fail{Mismatch{expected, got}}:
319 Fail{Mismatch{expected, got}}
320 case Fail{Empty{}}:
321 Fail{Empty{}}