MlbendMetrics.f1_of: def of mlbend-metrics@0.1.0.0 Import: import mlbend-metrics@0.1.0.0/main.bend as MlbendMetrics Lines 297-311 of mlbend-metrics@0.1.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=mlbend-metrics@0.1.0.0/main.bend&start_line=297&end_line=311 import Base # the harmonic mean of a precision and a recall def f1_of(p: Result<&1, &1, Bad, F32>, r: Result<&1, &1, Bad, F32>) -> Result<&1, &1, Bad, F32>: match p: case Done{pv}: match r: case Done{rv}: Done{f1_num(pv, rv)} case Fail{Mismatch{expected, got}}: Fail{Mismatch{expected, got}} case Fail{Empty{}}: Fail{Empty{}} case Fail{Mismatch{expected, got}}: Fail{Mismatch{expected, got}} case Fail{Empty{}}: Fail{Empty{}} Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=mlbend-metrics@0.1.0.0/main.bend&name=Bad https://jend.leeeet.dev/definition.txt?path=mlbend-metrics@0.1.0.0/main.bend&name=f1_num