interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / src / estimation / est_defs.om

162 lines · 4879 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note Shared constants and struct declarations for the pure seeded OM-2 estimation stack
3note (EST-0 types, EST-1 KF, EST-1 info ref, EST-3b scale mixture, EST-2/v3 discrete
4note predictive layer, and EST-v4 persistence-aware families).
5note Must be first in any concatenated omc build so om2 and all structs precede the first fn.
6om2
7
8const EST_MAX_DIM ulong 8
9const EST_DIGEST_SIZE ulong 32
10const EST_FORMAT_VERSION ulong 1
11const EST_MAX_HORIZON ulong 1000000
12const EST_ENCODED_MAX ulong 2304
13
14const EST_KIND_MODEL ulong 1
15const EST_KIND_OBSERVATION ulong 2
16const EST_KIND_BELIEF ulong 3
17const EST_KIND_PREDICTION ulong 4
18const EST_KIND_INNOVATION ulong 5
19
20const EST_UNIT_NONE ulong 0
21const EST_UNIT_MILLI_CELSIUS ulong 1
22const EST_UNIT_MILLI_CELSIUS_PER_S ulong 2
23const EST_UNIT_WATT ulong 3
24const EST_UNIT_WATT_PER_S ulong 4
25const EST_UNIT_NANOSECOND ulong 5
26const EST_UNIT_BYTE ulong 6
27const EST_UNIT_DIMENSIONLESS ulong 7
28const EST_UNIT_LOG2_PICOSECOND ulong 8
29const EST_UNIT_MAX ulong 9
30
31const EST_UNCERTAINTY_GAUSSIAN ulong 1
32const EST_ESTIMATOR_LINEAR_KALMAN ulong 1
33
34const EST_OK long 0
35const EST_ERR_NULL long -1
36const EST_ERR_DIM long -2
37const EST_ERR_NONFINITE long -3
38const EST_ERR_ASYMMETRIC long -4
39const EST_ERR_NOT_PSD long -5
40const EST_ERR_NOT_PD long -6
41const EST_ERR_UNIT long -7
42const EST_ERR_STALE long -8
43const EST_ERR_MODEL long -9
44const EST_ERR_KIND long -10
45const EST_ERR_ENCODING long -11
46const EST_ERR_TIME long -12
47
48const EST_MIX_MAX ulong 3
49const EST_MIX_MAX_H ulong 64
50
51const EST_PRED_K long 400
52const EST_PRED_KU ulong 400
53const EST_PRED_N ulong 801
54const EST_PRED_MAX_H ulong 64
55const EST_PRED_NPARAM ulong 8
56const EST_PRED_FLOOR f64 1.0e-12
57const EST_PRED_GRID_TOL f64 1.0e-6
58
59const EST_FAM_GAUSS_KF ulong 1
60const EST_FAM_HUBER_KF ulong 2
61const EST_FAM_STUDENT_T ulong 3
62const EST_FAM_SCALE_MIX ulong 4
63const EST_FAM_ADAPTIVE_T ulong 5
64
65const EST_OBS_OK ulong 0
66const EST_OBS_MISSING ulong 1
67const EST_OBS_NONFINITE ulong 2
68const EST_OBS_OFF_GRID ulong 3
69const EST_OBS_OUT_OF_RANGE ulong 4
70const EST_OBS_CLASSES ulong 5
71
72const EST_NOT_CALIBRATED ulong 0
73const EST_CALIBRATED ulong 1
74
75const EST4_MAX_D ulong 3
76const EST4_GL_LAMBDA f64 0.995
77const EST4_TAU_RATIO f64 10.0
78const EST4_G3_W f64 0.5
79
80const EST4_G1_LAG ulong 1
81const EST4_G2_AR ulong 2
82const EST4_G3_TWO ulong 3
83
84note ---- Flat ulong array layouts for EST-0/EST-1 records (>64 cells) ----
85
86const EST_MODEL_LEN ulong 280
87const EM_N ulong 0
88const EM_M ulong 1
89const EM_EST ulong 2
90const EM_MEAN ulong 3
91const EM_STEP ulong 4
92const EM_SUNIT ulong 5
93const EM_OUNIT ulong 13
94const EM_F ulong 21
95const EM_Q ulong 85
96const EM_H ulong 149
97const EM_R ulong 213
98
99const EST_OBS_LEN ulong 96
100const EO_M ulong 0
101const EO_TNS ulong 1
102const EO_SEQ ulong 2
103const EO_UNIT ulong 3
104const EO_Z ulong 11
105const EO_R ulong 19
106const EO_SRC ulong 83
107const EO_EV ulong 87
108
109const EST_BELIEF_LEN ulong 96
110const EB_N ulong 0
111const EB_GEN ulong 1
112const EB_TNS ulong 2
113const EB_UNIT ulong 3
114const EB_X ulong 11
115const EB_P ulong 19
116const EB_MDL ulong 83
117const EB_PAR ulong 87
118const EB_ROOT ulong 91
119
120const EST_PRED_LEN ulong 176
121const EP_PRIOR ulong 0
122const EP_MDL ulong 4
123const EP_HZ ulong 8
124const EP_GEN ulong 9
125const EP_TNS ulong 10
126const EP_N ulong 11
127const EP_M ulong 12
128const EP_HC ulong 13
129const EP_X ulong 14
130const EP_YM ulong 22
131const EP_BU ulong 30
132const EP_P ulong 38
133const EP_S ulong 102
134
135const EST_INNOV_LEN ulong 96
136const EI_PRED ulong 0
137const EI_OBS ulong 4
138const EI_MDL ulong 8
139const EI_M ulong 12
140const EI_NIS ulong 13
141const EI_TNS ulong 14
142const EI_NU ulong 15
143const EI_S ulong 23
144
145const EST_REF_LEN ulong 73
146const ER_N ulong 0
147const ER_Y ulong 1
148const ER_YV ulong 65
149
150note ---- Compact structs (all <= 64 cells) ----
151
152struct EstMix k ulong w f64 3 v f64 3 end
153struct EstAssump family ulong unit ulong quantum f64 lo f64 hi f64 nparam ulong param f64 8 end
154struct EstPObs val f64 cls ulong evidence uchar 32 end
155struct EstBState assumption ulong 4 has_anchor ulong anchor f64 xhat f64 P f64 s2 f64 gap ulong generation ulong evidence_root ulong 4 cnt ulong 5 cache_valid ulong cache_key f64 cache_lo long cache_hi long end
156struct EstDPred assumption uchar 32 family ulong horizon ulong generation ulong anchor f64 quantum f64 end
157struct EstPInnov valid ulong cls ulong k long F_lo f64 F_hi f64 logp f64 z f64 end
158struct EstCalib n ulong cov f64 3 pit f64 10 logp_sum f64 width_sum f64 z_sum f64 z_sq f64 z_lag f64 z_prev f64 end
159struct EstBands cov50 f64 2 cov80 f64 2 cov95 f64 2 pit f64 2 bias_max f64 lag1_max f64 min_n ulong end
160struct Est4Params family ulong dyn f64 q f64 lam f64 nu f64 c f64 phi f64 nu_h f64 c_h f64 quantum f64 end
161struct Est4State family ulong pv f64 9 d ulong A f64 9 Q f64 9 H f64 3 r f64 has_anchor ulong anchor f64 gap ulong x f64 3 P f64 9 g f64 gl f64 generation ulong end
162struct Est4Pred h ulong loc f64 scale f64 nu f64 end