nx_analyst_insight.nx
buildroot/runtime/nx_analyst_insight.nx
about
nx_analyst_insight.nx -- AUTOMATED INSIGHT MINING (F1003): point at a dataset with NO target column and
get back RANKED findings. Every other analyst entry point we have answers a question you already framed
(ar_analyze needs a target); this one finds the question.
THE HONESTY PROBLEM THIS IS BUILT AROUND. Scanning all column pairs means testing C(k,2) hypotheses and
reporting the best -- which is p-hacking with extra steps unless two things are true:
(1) the significance bar is FAMILY-WISE over every hypothesis actually tested (Bonferroni over the pair
count, via nx_analyst_infer), not per-test .05; and
(2) the report DISCLOSES how many hypotheses were tested and what level survived, so a reader can see
the multiplicity instead of being handed only the winners.
A miner that quietly reports "the top 5 correlations" out of 190 tested pairs is manufacturing findings.
Both are enforced below and gated.
FINDING CLASSES: RELATIONSHIP (significant |r|) · NONLINEAR-MONOTONE (Spearman clears the bar and beats
Pearson by a configured margin -- the pair moves together but not in a straight line, which a
correlation-only scan reports as "moderate" and a human then misreads) · CONSTANT · ID-LIKE ·
SKEWED · OUTLIERS. Thresholds and score weights are DATA (analyst_insight.conf), not literals (rule 11).
license_tier: ORIGINAL No hardware writes (Rule 26).
dependencies 4 imports · 2 importers
imports: nx_syscalls.nxnx_analyst_data.nxnx_analyst_multi.nxnx_analyst_infer.nx
imported by: nx_analyst_insight_gate.nxnx_analyze.nx
structs
| none |
consts
| 23 | const IN_MAGIC_1400: i64 = 1400 |
| 24 | const IN_MAGIC_1200: i64 = 1200 |
| 25 | const IN_MAGIC_1000000: i64 = 1000000 |
| 26 | const IN_MAGIC_4096: i64 = 4096 |
| 28 | const IN_MAXF: i64 = 2048 // finding slots |
| 29 | const IN_CONF_CAP: i64 = 4096 |
| 30 | const IN_PROF: i64 = 16 |
| 31 | const IN_TAB: i64 = 9 |
| 32 | const IN_HASH: i64 = 35 |
| 33 | const IN_NL: i64 = 10 |
| 34 | const IN_CR: i64 = 13 |
| 35 | const IN_ZERO: i64 = 48 |
| 37 | const IN_K_REL: i64 = 1 |
| 38 | const IN_K_NONLIN: i64 = 2 |
| 39 | const IN_K_CONST: i64 = 3 |
| 40 | const IN_K_IDLIKE: i64 = 4 |
| 41 | const IN_K_SKEW: i64 = 5 |
| 42 | const IN_K_OUTLIER: i64 = 6 |
functions
| 44 | func ins_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { d[o + i] = s[i]; i = i + 1 } return o + i } called by 1: ai_mine |
| 45 | func ins_catn(d: *u8, o: i64, v: i64) -> i64 |
| 57 | func ins_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } |
| 62 | func ins_distinct(col: *i64, n: i64) -> i64 |
| 74 | func ins_atoi_rng(buf: *u8, a: i64, b: i64) -> i64 called by 1: ins_conf |
| 89 | func ins_conf(key: *u8, dflt: i64) -> i64 |
| 124 | func ins_add(kind: *i64, ca: *i64, cb2: *i64, sc: *i64, st: *i64, cnt: i64, k: i64, a: i64, b: i64, score: i64, stat: i64) -> i64 |
| 139 | func ai_mine_scan(cols: *i64, names: *i64, ncol: i64, n: i64, kind: *i64, fa: *i64, fb: *i64, fs: *i64, ft: *i64, meta: *i64) -> i64 called by 1: az_mine calls 10: ins_confai_alpha_for_mam_pearson_milliai_spearman_milliins_absai_r_sig_bonferroni+4 |
| 243 | func ai_mine(cols: *i64, names: *i64, ncol: i64, n: i64, out: *u8, cap: i64) -> i64 called by 1: main calls 13: ins_confai_alpha_for_msys_mmapam_pearson_milliai_spearman_milliins_abs+7 |