def rmse.go

mlbend-metrics@0.1.0.0 · main.bend:232

import mlbend-metrics@0.1.0.0/main.bend as MlbendMetrics
import Base

232# the root mean squared error between the targets and the predictions
233def rmse.go(r: Result<&1, &1, Bad, Nat>, +ys: List<&2, F32>, +ps: List<&2, F32>) -> Result<&1, &1, Bad, F32>:
234  match r:
235    case Done{n}:
236      Done{F32.sqrt(mean(sq_sum.go(ys, ps, Sum{0n, 0.0}), n))}
237    case Fail{Mismatch{expected, got}}:
238      Fail{Mismatch{expected, got}}
239    case Fail{Empty{}}:
240      Fail{Empty{}}

Uses (9)

Used by (1)