nx_bench_metrics.nx
buildroot/runtime/nx_bench_metrics.nx
about
nx_bench_metrics.nx -- sovereign retrieval-quality metric kernels.
module: nishi-core.search.bench.metrics
depends: fx.nx (Q16.16 fixed-point + fx_log2), syscalls.nx (scratch mmap)
capability: CORE_COMPUTE
wired_status: FULLY_WIRED
The math behind the "Mount Everest of information delivery" leaderboard:
score Nishi 1:1 against the real engines on a chosen turf. Built bits-up
in deterministic Q16.16 fixed-point so a result is BYTE-IDENTICAL on every
machine -- the two-is-one parity discipline demands that an IEEE-754 port
could never satisfy (different libm log2 => different bits).
All ratio/gain values are Q16.16 (FX_ONE == 1.0). Ranks + counts are plain
integers. Every formula cites its source; goldens are in
nx_bench_metrics_test.nx.
Citations:
DCG/nDCG Jarvelin & Kekalainen, ACM TOIS 2002.
MAP/MRR/precision@k/recall@k Manning/Raghavan/Schutze, IIR 2008 ch.8.
primary-source precision Nishi anti-Google thesis (docs/00-VISION):
first-hand material (the film/photo/record itself) outranks derivative
commentary. Encoded as: tier score is the graded gain; derivative
results contribute zero gain even when topically relevant.
dependencies 2 imports · 2 importers
imports: fx.nxsyscalls.nx
imported by: nx_bench_harness.nxnx_bench_metrics_test.nx
structs
| none |
consts
| none |
functions
| 35 | func nx_bench_dcg(gains: *i64, n: i64, k: i64) -> i64 |
| 51 | func nx_bench_sort_desc(src: *i64, n: i64) -> *i64 called by 1: nx_bench_ndcg |
| 80 | func nx_bench_ndcg(gains: *i64, n: i64, k: i64) -> i64 |
| 93 | func nx_bench_contains(ids: *i64, n: i64, target: i64) -> i64 |
| 103 | func nx_bench_precision_at_k(retr: *i64, nret: i64, rel: *i64, nrel: i64, |
| 118 | func nx_bench_recall_at_k(retr: *i64, nret: i64, rel: *i64, nrel: i64, |
| 133 | func nx_bench_reciprocal_rank(retr: *i64, nret: i64, rel: *i64, |
| 146 | func nx_bench_average_precision(retr: *i64, nret: i64, rel: *i64, |
| 168 | func nx_bench_primary_precision_at_k(is_primary: *i64, n: i64, k: i64) -> i64 |
| 184 | func nx_bench_canonical_rate(canon: *i64, n: i64) -> i64 |
| 204 | func nx_bench_altitude(ndcg_q16: i64, primary_prec_q16: i64) -> i64 |