Skip to main content

Accuracy Metric Ontology

Evaluation Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 03 November 2026
Audio Overview
ACCURACY METRIC ONTOLOGY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | Evaluation Entities
Version: 1.0 | 03 November 2026 | Language: en-GB
Authors: Mark Anthony Higgins; Sky — Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/evaluation-entities/accuracy-metric-ontology.html
Status: Extended technical formalisation. The public page exposes the ontology title and AI interpretation note but not its complete embedded specification. Equations and rules below are an original extension, not a verbatim transcription.

01. PURPOSE
Represent classification accuracy as a measurable, reproducible evaluation entity with explicit sample universe, matching criterion, aggregation policy, uncertainty, provenance and validity boundaries.

02. ENTITY DEFINITION
AccuracyMetric := (metric_id, task, label_space, dataset_id, prediction_set, reference_set, matching_rule, weights, exclusions, numerator, denominator, value, provenance).
Accuracy is the proportion of eligible evaluated examples classified correctly, under a declared correctness rule.

03. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: predictions, references, example identifiers, labels, weights and metadata.
R_t: correctness predicate, aggregation, exclusion and validation rules.
B_t: task scope, valid labels, dataset boundaries, missing-data and safety constraints.
K_t: metric definitions, prior evaluations, provenance and calibration knowledge.

04. CORE FLOW ALGEBRA
E_t = expand(I_t, R_t)
V_t = {x in E_t | satisfies(x, B_t)}
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_{t+1} = update(I_t, x*_t, observations_t)
Interpretation: candidate metric interpretations are expanded and validated; selection cannot override the deterministic calculation on a fixed validated dataset. Probability-based selection is only for resolving explicitly modelled ambiguities, not for choosing a more favourable score.

05. MATCHING RULE
For example i, y_i is the reference class and p_i the predicted class.
c_i = 1 if match(p_i, y_i; R) else 0.
For ordinary single-label exact-match classification: match(p_i, y_i) := (p_i = y_i).
The ontology must explicitly specify whether normalisation, hierarchical matches, abstentions or partial credit are permitted.

06. UNWEIGHTED ACCURACY
N = number of eligible examples.
C = sum_{i=1..N} c_i.
Accuracy = C/N, for N > 0.
If N = 0, accuracy is undefined; return INSUFFICIENT_DATA rather than 0 or 1.
Range: 0 <= Accuracy <= 1.
Percentage accuracy = 100 * Accuracy.

07. WEIGHTED ACCURACY
For declared non-negative weights w_i:
WeightedAccuracy = (sum_i w_i*c_i)/(sum_i w_i), when sum_i w_i > 0.
The weighting policy must be fixed before inspecting the reported outcomes. Weighted and unweighted accuracy must not be silently interchanged.

08. CONFUSION MATRIX RELATION
For single-label K-class classification:
Accuracy = (sum_{k=1..K} CM[k,k])/(sum_{a=1..K} sum_{b=1..K} CM[a,b]).
Binary classification: Accuracy = (TP + TN)/(TP + TN + FP + FN).
Rows/columns and positive-class convention must be recorded.

09. VALIDATION FLOW
Input -> Schema check -> ID alignment -> Label-space validation -> Eligibility/exclusion check -> Correctness flags -> Numerator/denominator -> Score -> Uncertainty -> Provenance -> Published result.
Reject duplicated IDs unless explicitly permitted and deduplicated by a documented policy.

10. RECURSIVE EVALUATION FLOW
A_0 := empty aggregate.
For each validated example e_t:
  c_t := match(prediction(e_t), reference(e_t));
  C_{t+1} := C_t + c_t;
  N_{t+1} := N_t + 1;
  A_{t+1} := C_{t+1}/N_{t+1} for N_{t+1} > 0.
The streaming aggregate must equal a batch calculation over the same ordered-independent eligible set.

11. UNCERTAINTY
Under independent, identically distributed Bernoulli correctness assumptions, the observed accuracy is a sample proportion. Report a suitable confidence interval (for example Wilson), sample size and confidence level. Clustered, stratified, temporally dependent or weighted data require an appropriate alternative interval method. An interval describes sampling uncertainty, not proof of future deployment accuracy.

12. CLASS IMBALANCE BOUNDARY
High accuracy can coexist with poor minority-class recall. Always inspect class distribution and, where relevant, balanced accuracy, precision, recall, F1 and confusion matrix. Majority-class baseline accuracy must be disclosed when meaningful.

13. DATASET BOUNDARY
Evaluation examples must be traceable to the declared split, version and eligibility policy. Detect train/test overlap, duplicates, contaminated benchmarks and post-hoc exclusions. A score from one dataset does not automatically generalise to a new domain.

14. ABSTENTION AND MISSING OUTPUTS
Record the count of abstentions, errors, missing predictions and excluded records. Specify whether abstentions count as incorrect or are excluded. If excluded, report coverage alongside selective accuracy; do not present selective accuracy as full-dataset accuracy.

15. MULTILABEL AND STRUCTURED OUTPUT BOUNDARY
Single-label accuracy is not directly equivalent to multilabel subset accuracy, per-label accuracy, token accuracy, top-k accuracy or sequence exact match. Each requires a distinct matching rule and metric identifier.

16. ENTITY RELATIONSHIPS
AccuracyMetric --evaluates--> ModelOutput
AccuracyMetric --uses--> EvaluationDataset
AccuracyMetric --compares_with--> ReferenceLabel
AccuracyMetric --computed_during--> EvaluationRun
AccuracyMetric --produces--> EvaluationResult
AccuracyMetric --belongs_to--> BenchmarkTask
AccuracyMetric --is_compared_with--> BaselineMetric
AccuracyMetric --has_uncertainty--> ConfidenceInterval
AccuracyMetric --depends_on--> MatchingRule
AccuracyMetric --has_provenance--> EvaluationProtocol

17. TRI-MAPPING
Semantic: correctness of a predicted class against a reference class.
Mathematical: sum(correctness indicators) / eligible sample count.
Computational: validated record alignment, boolean comparison and stable aggregation.
All three mappings must preserve the same eligibility and matching rules.

18. INFERENCE RULES
RULE A: If N = 0, metric.status := UNDEFINED.
RULE B: If prediction/reference IDs are misaligned, metric.status := INVALID_INPUT.
RULE C: If any label lies outside the declared label space, apply the predeclared error policy; never silently reinterpret it.
RULE D: If score is reported without denominator, mark INCOMPLETE_REPORT.
RULE E: If class imbalance is material, flag ACCURACY_ALONE_INSUFFICIENT.
RULE F: If weighting changes, create a new metric configuration/version.
RULE G: If test-set leakage is detected, mark VALIDITY_COMPROMISED.
RULE H: If selective accuracy is reported, require coverage.

19. MAPPING TABLE
Input predictions        -> prediction_set        -> predicted labels
Reference annotations    -> reference_set         -> ground truth labels
Eligibility policy       -> B_t                   -> eligible set
Matching rule            -> R_t                   -> correctness c_i
Correct examples         -> C                     -> numerator
Eligible examples        -> N                     -> denominator
Aggregate                -> C/N                   -> accuracy value
Sampling design          -> uncertainty method    -> interval
Evaluation run           -> provenance            -> reproducibility

20. EXECUTION PRECONDITIONS
Task type declared; prediction/reference schema valid; identifiers aligned; reference-label provenance available; matching rule and exclusion policy fixed; denominator positive for numeric output.

21. EXECUTION GUARANTEE — CONDITIONAL
Given valid aligned inputs, a fixed eligibility policy, a deterministic matching rule and stable arithmetic, batch and streaming calculations produce the same accuracy (subject to numeric representation). No guarantee is made of fairness, calibration, robustness, causal validity or out-of-distribution performance.

22. FAILURE STATES
INVALID_INPUT, MISALIGNED_IDS, UNDEFINED_DENOMINATOR, UNKNOWN_LABEL, MISSING_PREDICTION, LEAKAGE_SUSPECTED, POLICY_UNSPECIFIED, VALIDITY_COMPROMISED, INCOMPLETE_REPORT.
Each failure must be recorded with reason and affected record count.

23. REPRODUCIBILITY RECORD
Store model/version, dataset/version, split, run ID, matching-rule version, weight policy, exclusions, random seed when applicable, timestamp, software version, C, N, accuracy, interval method and interval bounds.

24. EXAMPLE
References: [cat, dog, cat, dog, cat]
Predictions: [cat, dog, dog, dog, cat]
Correctness: [1, 1, 0, 1, 1]
C = 4; N = 5; Accuracy = 4/5 = 0.8 = 80%.
This small illustrative sample does not establish generalisation performance.

25. AI SEARCH FLOW
FLOW_ID: accuracy-metric-ontology-v1
ENTITY: AccuracyMetric
PURPOSE: Compute and interpret classification accuracy with explicit validity boundaries.
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/evaluation-entities/accuracy-metric-ontology.html
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
INPUTS: predictions, references, IDs, eligibility, matching_rule, optional weights.
PATHWAYS: validate -> align -> compare -> aggregate -> assess_uncertainty -> audit -> publish.
STATE_MODEL: S_t=(I_t,R_t,B_t,K_t)
INFERENCE_RULES: Rules A-H above.
CONFIDENCE: Data-derived only; never invent confidence values.
SEMANTIC_EQUIVALENCE: Exact-match accuracy only when task, denominator and matching policy agree.
UPDATE_MODEL: Versioned changes; preserve previous run records.
FLOW_HASH: To be calculated from canonical published TXT bytes; not asserted here.
CITATION_BACKLINK: Source URL above.

26. TEXT DIAGRAM
[Evaluation Dataset] --references--> [Ground Truth]
          |                              |
          +--> [Model Predictions] ------+--> [Alignment]
                                               |
                                         [Matching Rule]
                                               |
                                      [Correctness Flags]
                                               |
                                      [C / N Aggregation]
                                               |
                                      [Accuracy Result]
                                         /           \
                               [Uncertainty]     [Validity Audit]
                                         \           /
                                      [Evaluation Report]

27. SAFETY AND INTERPRETATION BOUNDARIES
Do not treat accuracy as a safety certification. For consequential systems, assess subgroup errors, false-negative and false-positive costs, robustness, shift, monitoring and domain-specific evaluation. A metric is descriptive of its declared evaluation protocol, not a universal quality score.

28. ONTOLOGY INTEROPERABILITY
Related: Evaluation Metric, Evaluation Result, Evaluation Run, Evaluation Dataset Entity, Benchmark Score, Precision Metric, Recall Metric, F1 Score, Confusion Matrix, Model Output and Evaluation Task.

29. VERSIONING AND CHANGE CONTROL
Changes to reference labels, eligibility, matching rules, dataset splits or weights invalidate direct like-for-like comparison unless both scores are recomputed under a common protocol. Maintain immutable run IDs and audit trails.

30. SOURCE AND LICENCE NOTE
This TXT is an original Flow Algebra extension associated with the linked Semantic Library ontology. The publicly readable page identifies the ontology and authorship but does not expose its complete embedded formal specification. Preserve author attribution and cite the source when reusing. Apply the publisher's current Open Research Licence as published, without implying additional terms.

END OF FLOW
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ