metric
Metric
Bases: Named
, Protocol
Minimal template for metrics.
Call flow
call -> prepare(true), prepare(predicted) -> compute(true, predicted)
prepare(data)
Hook to normalize/collect/select data before computing metric.
Default: identity. Mixins override and call super().prepare(...)
Source code in src/flowcean/core/metric.py
24 25 26 27 28 29 |
|
__call__(true, predicted)
Execute metric: prepare inputs then compute.
Source code in src/flowcean/core/metric.py
35 36 37 38 39 40 41 42 |
|
compute(true, predicted)
Implement metric logic on prepared inputs.
Source code in src/flowcean/core/metric.py
44 45 46 47 48 |
|