code wiki / (root) / nx_analyst_insight.nx

nx_analyst_insight.nx

buildroot/runtime/nx_analyst_insight.nx

19804 B460 linesdepth 8pulls 17 transitivereach 3 importersview sourcekind librarytopic analyst
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_analyst_data.nx nx_analyst_multi.nx nx_analyst_infer.nx nx_analyst_insight.nx nx_analyst_insight_gate.nx nx_analyze.nx

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

23const IN_MAGIC_1400: i64 = 1400
24const IN_MAGIC_1200: i64 = 1200
25const IN_MAGIC_1000000: i64 = 1000000
26const IN_MAGIC_4096: i64 = 4096
28const IN_MAXF: i64 = 2048 // finding slots
29const IN_CONF_CAP: i64 = 4096
30const IN_PROF: i64 = 16
31const IN_TAB: i64 = 9
32const IN_HASH: i64 = 35
33const IN_NL: i64 = 10
34const IN_CR: i64 = 13
35const IN_ZERO: i64 = 48
37const IN_K_REL: i64 = 1
38const IN_K_NONLIN: i64 = 2
39const IN_K_CONST: i64 = 3
40const IN_K_IDLIKE: i64 = 4
41const IN_K_SKEW: i64 = 5
42const IN_K_OUTLIER: i64 = 6

functions

44func 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
45func ins_catn(d: *u8, o: i64, v: i64) -> i64
called by 1: ai_mine calls 1: sys_mmap
57func ins_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 2: ai_mine_scanai_mine
62func ins_distinct(col: *i64, n: i64) -> i64
called by 2: ai_mine_scanai_mine
74func ins_atoi_rng(buf: *u8, a: i64, b: i64) -> i64
called by 1: ins_conf
89func ins_conf(key: *u8, dflt: i64) -> i64
124func 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
called by 2: ai_mine_scanai_mine
139func ai_mine_scan(cols: *i64, names: *i64, ncol: i64, n: i64, kind: *i64, fa: *i64, fb: *i64, fs: *i64, ft: *i64, meta: *i64) -> i64
243func ai_mine(cols: *i64, names: *i64, ncol: i64, n: i64, out: *u8, cap: i64) -> i64