---
title: "prag-eval-scores — Mova code model"
description: "Mova code model of prag/src/eval.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/prag/src/eval.rs.groupant/scores.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/prag/src/eval.rs.groupant/scores.groupant/>

# prag-eval-scores

The groupant beside prag/src/eval.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

## Facts

- **kind:** groupant_fragment
- **status:** partial source bound model
- **source:** [`prag/src/eval.rs`](https://github.com/ElamurAI/mova-free/blob/main/prag/src/eval.rs)
- **source SHA-256:** `c6a0e3ae0e424ffd…`
- **covers:** Require equal lengths and all classes in [0,C). Accuracy=sum_i[g_i=p_i]/max(N,1). Let gp_c and pp_c be marginal counts and tp_c diagonal counts. Macro-F1 averages 2tp_c/(gp_c+pp_c) over classes with nonzero denominator. Empty inputs yield (0,0), including C=0. (bytes 3360–4503)
- **part of:** [prag-eval](https://md.groupants.elamur.ai/free/en/mova/prag/src/eval.rs.groupant/)
- **repository folder:** [`prag/src/eval.rs.groupant/scores.groupant`](https://github.com/ElamurAI/mova-free/tree/main/prag/src/eval.rs.groupant/scores.groupant)
- **repository commit:** `855da7bd4a7b`

> **Implementation material.** A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

## Components

| component | label | where |
|---|---|---|
| **approximant** | partial source model | [forward](#forward) |
| **ast** | partial | `../syntax.json` |
| **composition** | partial source model | [composition](#composition) |
| **cost** | partial source model | [cost](#cost) |
| **descriptant** | partial source model | [epoch-memory](#epoch-memory) |
| **invariant** | partial source model | [invariant](#invariant) |
| **tests** | partial source model | [checks](#checks) |

## Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

| id | type | label | where |
|---|---|---|---|
| `prag-eval-scores-behavior-complement` | behavior_complement | partial source model | [behavior-complement](#behavior-complement) |
| `prag-eval-scores-reverse-reconstruction` | reverse_reconstruction | partial source model | [reverse-reconstruction](#reverse-reconstruction) |
| `prag-eval-scores-specialization` | observation_relation | partial source model | [specialization](#specialization) |

## Model text


### forward
Require equal lengths and all classes in [0,C). Accuracy=sum_i[g_i=p_i]/max(N,1). Let gp_c and pp_c be marginal counts and tp_c diagonal counts. Macro-F1 averages 2tp_c/(gp_c+pp_c) over classes with nonzero denominator. Empty inputs yield (0,0), including C=0.

### invariant
Both metrics lie in [0,1]. Joint permutation and swapping gold/pred preserve results. Unused classes do not dilute macro-F1. Invalid lengths reject before class validation.

### cost
O(N*C) time from repeated per-class scans, O(C) f1 storage; new precondition checks O(N). No histogram optimization or performance claim.

### behavior-complement
Accepting mismatched lengths by zip truncation, counting invalid classes only in accuracy, diluting by absent classes, or returning NaN on empty input is excluded. Domain and observation are those of forward; this is a source-derived partial exclusion model, not a general proof.

### reverse-reconstruction
The metrics retain neither confusion matrix nor ordering. For N=2,C=2 both ([0,0],[0,0]) and ([1,1],[1,1]) map to (1,1); a common permutation preserves any score. Reconstruction must preserve N,C if supplied as side information. The relation is all compatible antecedents, with no uniqueness claim.

### specialization
Independent 2x2 confusion-matrix enumeration covers 341 paired binary sequences of lengths 0..4, using C=3 to check absent-class exclusion; five invalid-domain cases reject.

### composition
Children share source identity and dictionary/sample or record indices. Parent order and domains constrain joins; leaf observations alone do not establish external orchestration. Overlapping scopes must not double-count costs.

### checks
Seven wave14_models tests: four evaluation and three data; supplied inputs only. Debug twice and release twice; compiled production mutation per source must fail a named assertion. Syntax generated twice identically. Receipts summarize final evidence.

### epoch-memory
2026-10-30: first coverage of these previously unmodeled files. Prospective review predicted no valid-domain metric change and O(N) extra validation. Old source accepted mismatched vectors; the rejection witness failed (six other tests passed). Narrow assertions preserve tuple API and reject invalid domains. Data production behavior remains unchanged. Tiny two-row fitting exercises three learners without any training job.

### limitations
Partial syntax projection, opaque macros, no semantic AST or universal proof. No live parser, DB subprocess, external corpus, teacher, GPU or training job. External IO, report formatting, selection corner cases, malformed Set/Train and empty tale windows remain outside executed scope. No performance claim.
