robustmargin 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- robustmargin/__init__.py +90 -0
- robustmargin/censoring.py +652 -0
- robustmargin/empirical.py +348 -0
- robustmargin/intervals.py +785 -0
- robustmargin/models.py +2119 -0
- robustmargin/py.typed +0 -0
- robustmargin/ratio.py +941 -0
- robustmargin/report.py +650 -0
- robustmargin/schema/scorecard-v1.json +777 -0
- robustmargin/testing.py +465 -0
- robustmargin/threshold.py +631 -0
- robustmargin/types.py +541 -0
- robustmargin/validation.py +722 -0
- robustmargin-0.1.1.dist-info/METADATA +281 -0
- robustmargin-0.1.1.dist-info/RECORD +18 -0
- robustmargin-0.1.1.dist-info/WHEEL +5 -0
- robustmargin-0.1.1.dist-info/licenses/LICENSE +201 -0
- robustmargin-0.1.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,777 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:robustmargin:schema:scorecard-v1",
|
|
4
|
+
"title": "robustmargin score card (v1)",
|
|
5
|
+
"description": "A robustmargin Scorecard: a collection of GridBreakPoint, Fit, Threshold and Ratio results plus provenance metadata. This is schema version \"1\", the only version robustmargin reads. Fit.diagnostics is an object or null, set only when the fit's own status is OK (model-only goodness of fit, dispersion and link comparison -- see the Diagnostics def, which deliberately has no monotonicity entry of its own); Fit.monotonicity is an object or null, set on every fresh Fit regardless of status (a data-only adjacent-severity-level check on raw counts -- see the MonotonicityCheck and AdjacentPair defs). Neither field is required on Fit: a payload that omits either still validates and still loads through from_dict with that field None. IntervalShape.HALF_OPEN is valid; Fit.model accepts only \"binomial\", Fit.direction and Threshold.direction accept only \"decreasing\", and Ratio.dependence accepts only \"independent\". Adding a result family or an enum value (for example ll4, isotonic or paired) is a schema_version change, not a silent extension of this one. Each object's `properties` keys match its dataclass's field names exactly (plus `type` for the five tagged result types). additionalProperties is false everywhere: an unrecognised field is a reader/writer version mismatch, not a safe extension, in this schema version.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"type": {
|
|
9
|
+
"const": "Scorecard"
|
|
10
|
+
},
|
|
11
|
+
"results": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": {
|
|
14
|
+
"oneOf": [
|
|
15
|
+
{
|
|
16
|
+
"$ref": "#/$defs/GridBreakPoint"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"$ref": "#/$defs/Fit"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"$ref": "#/$defs/Threshold"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"$ref": "#/$defs/Ratio"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"provenance": {
|
|
31
|
+
"type": "object"
|
|
32
|
+
},
|
|
33
|
+
"created_at": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"library_version": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"schema_version": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"required": [
|
|
44
|
+
"type",
|
|
45
|
+
"results",
|
|
46
|
+
"created_at",
|
|
47
|
+
"library_version",
|
|
48
|
+
"schema_version"
|
|
49
|
+
],
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"$defs": {
|
|
52
|
+
"GridBreakPoint": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"description": "robustmargin.GridBreakPoint: the grid break-point rule's result (an observed statistic, not a fitted threshold).",
|
|
55
|
+
"properties": {
|
|
56
|
+
"type": {
|
|
57
|
+
"const": "GridBreakPoint"
|
|
58
|
+
},
|
|
59
|
+
"value": {
|
|
60
|
+
"type": [
|
|
61
|
+
"number",
|
|
62
|
+
"null"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"max_tested": {
|
|
66
|
+
"type": "number"
|
|
67
|
+
},
|
|
68
|
+
"censoring": {
|
|
69
|
+
"$ref": "#/$defs/Censoring"
|
|
70
|
+
},
|
|
71
|
+
"schema_version": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
"provenance": {
|
|
75
|
+
"type": "object"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": [
|
|
79
|
+
"type",
|
|
80
|
+
"value",
|
|
81
|
+
"max_tested",
|
|
82
|
+
"censoring"
|
|
83
|
+
],
|
|
84
|
+
"additionalProperties": false
|
|
85
|
+
},
|
|
86
|
+
"Fit": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"description": "robustmargin.Fit: a dose-response fit, or an explicit record of why one was not obtained. This schema is binomial-only: model accepts only \"binomial\" and direction accepts only \"decreasing\" (increasing-is-worse outcomes are not yet supported). params are on the natural scale, never the optimiser's reparametrisation.",
|
|
89
|
+
"properties": {
|
|
90
|
+
"type": {
|
|
91
|
+
"const": "Fit"
|
|
92
|
+
},
|
|
93
|
+
"axis": {
|
|
94
|
+
"$ref": "#/$defs/Axis"
|
|
95
|
+
},
|
|
96
|
+
"outcome": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"direction": {
|
|
100
|
+
"enum": [
|
|
101
|
+
"decreasing"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"model": {
|
|
105
|
+
"enum": [
|
|
106
|
+
"binomial"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"link": {
|
|
110
|
+
"enum": [
|
|
111
|
+
"probit",
|
|
112
|
+
"logit",
|
|
113
|
+
"cloglog"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"params": {
|
|
117
|
+
"anyOf": [
|
|
118
|
+
{
|
|
119
|
+
"type": "null"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"type": "object",
|
|
123
|
+
"properties": {
|
|
124
|
+
"mu": {
|
|
125
|
+
"$ref": "#/$defs/Parameter"
|
|
126
|
+
},
|
|
127
|
+
"s": {
|
|
128
|
+
"$ref": "#/$defs/Parameter"
|
|
129
|
+
},
|
|
130
|
+
"upper": {
|
|
131
|
+
"$ref": "#/$defs/Parameter"
|
|
132
|
+
},
|
|
133
|
+
"lower": {
|
|
134
|
+
"$ref": "#/$defs/Parameter"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"required": [
|
|
138
|
+
"mu",
|
|
139
|
+
"s",
|
|
140
|
+
"upper",
|
|
141
|
+
"lower"
|
|
142
|
+
],
|
|
143
|
+
"additionalProperties": false
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
"covariance": {
|
|
148
|
+
"anyOf": [
|
|
149
|
+
{
|
|
150
|
+
"type": "null"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"$ref": "#/$defs/Covariance"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"log_likelihood": {
|
|
158
|
+
"type": [
|
|
159
|
+
"number",
|
|
160
|
+
"null"
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
"cells": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"items": {
|
|
166
|
+
"$ref": "#/$defs/Cell"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"status": {
|
|
170
|
+
"$ref": "#/$defs/Status"
|
|
171
|
+
},
|
|
172
|
+
"cluster_ids": {
|
|
173
|
+
"type": [
|
|
174
|
+
"array",
|
|
175
|
+
"null"
|
|
176
|
+
],
|
|
177
|
+
"items": {
|
|
178
|
+
"type": [
|
|
179
|
+
"string",
|
|
180
|
+
"integer"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"minItems": 1,
|
|
184
|
+
"uniqueItems": true
|
|
185
|
+
},
|
|
186
|
+
"warnings": {
|
|
187
|
+
"type": "array",
|
|
188
|
+
"items": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"schema_version": {
|
|
193
|
+
"type": "string"
|
|
194
|
+
},
|
|
195
|
+
"provenance": {
|
|
196
|
+
"type": "object"
|
|
197
|
+
},
|
|
198
|
+
"diagnostics": {
|
|
199
|
+
"description": "Model-only goodness of fit, dispersion and link comparison. Set exactly when this Fit's own status is OK; null otherwise.",
|
|
200
|
+
"anyOf": [
|
|
201
|
+
{
|
|
202
|
+
"type": "null"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"$ref": "#/$defs/Diagnostics"
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"monotonicity": {
|
|
210
|
+
"description": "A data-only adjacent-severity-level monotonicity check, computed from the raw Observations before a fitting path was chosen. Set on every freshly-built Fit regardless of status; null only when a payload omits it.",
|
|
211
|
+
"anyOf": [
|
|
212
|
+
{
|
|
213
|
+
"type": "null"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"$ref": "#/$defs/MonotonicityCheck"
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"required": [
|
|
222
|
+
"type",
|
|
223
|
+
"axis",
|
|
224
|
+
"outcome",
|
|
225
|
+
"direction",
|
|
226
|
+
"model",
|
|
227
|
+
"link",
|
|
228
|
+
"params",
|
|
229
|
+
"covariance",
|
|
230
|
+
"log_likelihood",
|
|
231
|
+
"cells",
|
|
232
|
+
"status"
|
|
233
|
+
],
|
|
234
|
+
"additionalProperties": false
|
|
235
|
+
},
|
|
236
|
+
"Threshold": {
|
|
237
|
+
"type": "object",
|
|
238
|
+
"description": "robustmargin.Threshold: where a fitted curve crosses a target performance, with a confidence interval, or an explicit record of why no value is reported. direction accepts only \"decreasing\" (increasing-is-worse outcomes are not yet supported). Per-level trial counts live on fit.cells, not on a separate field.",
|
|
239
|
+
"properties": {
|
|
240
|
+
"type": {
|
|
241
|
+
"const": "Threshold"
|
|
242
|
+
},
|
|
243
|
+
"axis": {
|
|
244
|
+
"$ref": "#/$defs/Axis"
|
|
245
|
+
},
|
|
246
|
+
"definition": {
|
|
247
|
+
"$ref": "#/$defs/Definition"
|
|
248
|
+
},
|
|
249
|
+
"direction": {
|
|
250
|
+
"enum": [
|
|
251
|
+
"decreasing"
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
"value": {
|
|
255
|
+
"type": [
|
|
256
|
+
"number",
|
|
257
|
+
"null"
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
"lo": {
|
|
261
|
+
"type": [
|
|
262
|
+
"number",
|
|
263
|
+
"null"
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
"hi": {
|
|
267
|
+
"type": [
|
|
268
|
+
"number",
|
|
269
|
+
"null"
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
"level": {
|
|
273
|
+
"type": "number"
|
|
274
|
+
},
|
|
275
|
+
"interval_method": {
|
|
276
|
+
"enum": [
|
|
277
|
+
"profile",
|
|
278
|
+
"delta",
|
|
279
|
+
"exact_bound"
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
"censoring": {
|
|
283
|
+
"$ref": "#/$defs/Censoring"
|
|
284
|
+
},
|
|
285
|
+
"status": {
|
|
286
|
+
"$ref": "#/$defs/Status"
|
|
287
|
+
},
|
|
288
|
+
"dependence": {
|
|
289
|
+
"enum": [
|
|
290
|
+
"independent"
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
"fit": {
|
|
294
|
+
"$ref": "#/$defs/Fit"
|
|
295
|
+
},
|
|
296
|
+
"warnings": {
|
|
297
|
+
"type": "array",
|
|
298
|
+
"items": {
|
|
299
|
+
"type": "string"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"baseline": {
|
|
303
|
+
"description": "Set when status is FAILS_AT_BASELINE, null otherwise.",
|
|
304
|
+
"oneOf": [
|
|
305
|
+
{
|
|
306
|
+
"$ref": "#/$defs/BaselineRate"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"type": "null"
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
"grid": {
|
|
314
|
+
"description": "The grid break-point accompanying a SEPARATION/NOT_CONVERGED exact-bound fallback, null otherwise. It is a grid statistic at grid resolution and is never the threshold value.",
|
|
315
|
+
"oneOf": [
|
|
316
|
+
{
|
|
317
|
+
"$ref": "#/$defs/GridBreakPoint"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"type": "null"
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
"schema_version": {
|
|
325
|
+
"type": "string"
|
|
326
|
+
},
|
|
327
|
+
"provenance": {
|
|
328
|
+
"type": "object"
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"required": [
|
|
332
|
+
"type",
|
|
333
|
+
"axis",
|
|
334
|
+
"definition",
|
|
335
|
+
"direction",
|
|
336
|
+
"value",
|
|
337
|
+
"lo",
|
|
338
|
+
"hi",
|
|
339
|
+
"level",
|
|
340
|
+
"interval_method",
|
|
341
|
+
"censoring",
|
|
342
|
+
"status",
|
|
343
|
+
"dependence",
|
|
344
|
+
"fit"
|
|
345
|
+
],
|
|
346
|
+
"additionalProperties": false
|
|
347
|
+
},
|
|
348
|
+
"Ratio": {
|
|
349
|
+
"type": "object",
|
|
350
|
+
"description": "robustmargin.Ratio: the ratio of two thresholds' severities, on the same axis, with a confidence interval. A failed or censored ratio (status != OK or censoring != NONE) carries shape=null, estimate=null, lo=null, hi=null -- no numbers. dependence accepts only \"independent\" (a later release adds \"paired\"). IntervalShape.HALF_OPEN means lo set, hi null, i.e. [lo, inf); EXCLUSIVE stays a valid shape (its Ratio invariants are still enforced) but is unreachable from ratio_interval() while dependence=\"independent\".",
|
|
351
|
+
"properties": {
|
|
352
|
+
"type": {
|
|
353
|
+
"const": "Ratio"
|
|
354
|
+
},
|
|
355
|
+
"threshold_a": {
|
|
356
|
+
"$ref": "#/$defs/Threshold"
|
|
357
|
+
},
|
|
358
|
+
"threshold_b": {
|
|
359
|
+
"$ref": "#/$defs/Threshold"
|
|
360
|
+
},
|
|
361
|
+
"estimate": {
|
|
362
|
+
"type": [
|
|
363
|
+
"number",
|
|
364
|
+
"null"
|
|
365
|
+
]
|
|
366
|
+
},
|
|
367
|
+
"lo": {
|
|
368
|
+
"type": [
|
|
369
|
+
"number",
|
|
370
|
+
"null"
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
"hi": {
|
|
374
|
+
"type": [
|
|
375
|
+
"number",
|
|
376
|
+
"null"
|
|
377
|
+
]
|
|
378
|
+
},
|
|
379
|
+
"shape": {
|
|
380
|
+
"anyOf": [
|
|
381
|
+
{
|
|
382
|
+
"type": "null"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"$ref": "#/$defs/IntervalShape"
|
|
386
|
+
}
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
"method": {
|
|
390
|
+
"enum": [
|
|
391
|
+
"fieller",
|
|
392
|
+
"log_delta"
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
"dependence": {
|
|
396
|
+
"enum": [
|
|
397
|
+
"independent"
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
"level": {
|
|
401
|
+
"type": "number"
|
|
402
|
+
},
|
|
403
|
+
"censoring": {
|
|
404
|
+
"$ref": "#/$defs/Censoring"
|
|
405
|
+
},
|
|
406
|
+
"status": {
|
|
407
|
+
"$ref": "#/$defs/Status"
|
|
408
|
+
},
|
|
409
|
+
"warnings": {
|
|
410
|
+
"type": "array",
|
|
411
|
+
"items": {
|
|
412
|
+
"type": "string"
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"schema_version": {
|
|
416
|
+
"type": "string"
|
|
417
|
+
},
|
|
418
|
+
"provenance": {
|
|
419
|
+
"type": "object"
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"required": [
|
|
423
|
+
"type",
|
|
424
|
+
"threshold_a",
|
|
425
|
+
"threshold_b",
|
|
426
|
+
"estimate",
|
|
427
|
+
"lo",
|
|
428
|
+
"hi",
|
|
429
|
+
"shape",
|
|
430
|
+
"method",
|
|
431
|
+
"dependence",
|
|
432
|
+
"level",
|
|
433
|
+
"censoring",
|
|
434
|
+
"status"
|
|
435
|
+
],
|
|
436
|
+
"additionalProperties": false
|
|
437
|
+
},
|
|
438
|
+
"Axis": {
|
|
439
|
+
"type": "object",
|
|
440
|
+
"description": "robustmargin.Axis: the severity axis a series of observations was measured on.",
|
|
441
|
+
"properties": {
|
|
442
|
+
"name": {
|
|
443
|
+
"type": "string"
|
|
444
|
+
},
|
|
445
|
+
"unit": {
|
|
446
|
+
"type": "string"
|
|
447
|
+
},
|
|
448
|
+
"scale": {
|
|
449
|
+
"enum": [
|
|
450
|
+
"log",
|
|
451
|
+
"linear"
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
"citation": {
|
|
455
|
+
"type": [
|
|
456
|
+
"string",
|
|
457
|
+
"null"
|
|
458
|
+
]
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"required": [
|
|
462
|
+
"name",
|
|
463
|
+
"unit",
|
|
464
|
+
"scale"
|
|
465
|
+
],
|
|
466
|
+
"additionalProperties": false
|
|
467
|
+
},
|
|
468
|
+
"Definition": {
|
|
469
|
+
"type": "object",
|
|
470
|
+
"description": "robustmargin.Definition: which target performance a threshold solves for.",
|
|
471
|
+
"properties": {
|
|
472
|
+
"kind": {
|
|
473
|
+
"enum": [
|
|
474
|
+
"absolute",
|
|
475
|
+
"baseline_fraction",
|
|
476
|
+
"relative"
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
"value": {
|
|
480
|
+
"type": "number"
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"required": [
|
|
484
|
+
"kind",
|
|
485
|
+
"value"
|
|
486
|
+
],
|
|
487
|
+
"additionalProperties": false
|
|
488
|
+
},
|
|
489
|
+
"Cell": {
|
|
490
|
+
"type": "object",
|
|
491
|
+
"description": "robustmargin.Cell: one pooled row of counts at a single severity.",
|
|
492
|
+
"properties": {
|
|
493
|
+
"severity": {
|
|
494
|
+
"type": "number"
|
|
495
|
+
},
|
|
496
|
+
"successes": {
|
|
497
|
+
"type": "integer"
|
|
498
|
+
},
|
|
499
|
+
"trials": {
|
|
500
|
+
"type": "integer"
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"required": [
|
|
504
|
+
"severity",
|
|
505
|
+
"successes",
|
|
506
|
+
"trials"
|
|
507
|
+
],
|
|
508
|
+
"additionalProperties": false
|
|
509
|
+
},
|
|
510
|
+
"Parameter": {
|
|
511
|
+
"type": "object",
|
|
512
|
+
"description": "robustmargin.Parameter: one fitted or fixed parameter value, on the natural scale (never the optimiser's log/logit reparametrisation).",
|
|
513
|
+
"properties": {
|
|
514
|
+
"value": {
|
|
515
|
+
"type": "number"
|
|
516
|
+
},
|
|
517
|
+
"fixed": {
|
|
518
|
+
"type": "boolean"
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
"required": [
|
|
522
|
+
"value",
|
|
523
|
+
"fixed"
|
|
524
|
+
],
|
|
525
|
+
"additionalProperties": false
|
|
526
|
+
},
|
|
527
|
+
"Covariance": {
|
|
528
|
+
"type": "object",
|
|
529
|
+
"description": "robustmargin.Covariance: the variance-covariance matrix of a fit's estimated (non-fixed) parameters, on the natural scale. Positive semi-definite.",
|
|
530
|
+
"properties": {
|
|
531
|
+
"names": {
|
|
532
|
+
"type": "array",
|
|
533
|
+
"items": {
|
|
534
|
+
"type": "string"
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
"matrix": {
|
|
538
|
+
"type": "array",
|
|
539
|
+
"items": {
|
|
540
|
+
"type": "array",
|
|
541
|
+
"items": {
|
|
542
|
+
"type": "number"
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
"required": [
|
|
548
|
+
"names",
|
|
549
|
+
"matrix"
|
|
550
|
+
],
|
|
551
|
+
"additionalProperties": false
|
|
552
|
+
},
|
|
553
|
+
"Censoring": {
|
|
554
|
+
"type": "string",
|
|
555
|
+
"enum": [
|
|
556
|
+
"NONE",
|
|
557
|
+
"RIGHT",
|
|
558
|
+
"LEFT",
|
|
559
|
+
"OPEN_UPPER",
|
|
560
|
+
"OPEN_LOWER"
|
|
561
|
+
]
|
|
562
|
+
},
|
|
563
|
+
"Status": {
|
|
564
|
+
"type": "string",
|
|
565
|
+
"enum": [
|
|
566
|
+
"OK",
|
|
567
|
+
"SEPARATION",
|
|
568
|
+
"NOT_CONVERGED",
|
|
569
|
+
"UNREACHABLE",
|
|
570
|
+
"FAILS_AT_BASELINE",
|
|
571
|
+
"CONTROL_INCOMPATIBLE"
|
|
572
|
+
]
|
|
573
|
+
},
|
|
574
|
+
"IntervalShape": {
|
|
575
|
+
"type": "string",
|
|
576
|
+
"enum": [
|
|
577
|
+
"BOUNDED",
|
|
578
|
+
"UNBOUNDED",
|
|
579
|
+
"EXCLUSIVE",
|
|
580
|
+
"HALF_OPEN"
|
|
581
|
+
]
|
|
582
|
+
},
|
|
583
|
+
"BaselineRate": {
|
|
584
|
+
"type": "object",
|
|
585
|
+
"description": "robustmargin.BaselineRate: the control cell's observed rate with its exact (Clopper-Pearson) interval, reported when a Threshold's status is FAILS_AT_BASELINE. An untagged helper, like Cell: it appears only as Threshold.baseline. Its lo/hi are a per-cell exact interval and are deliberately NOT a threshold interval -- a Clopper-Pearson interval is never attached to a threshold, which is why these live here and never in Threshold.lo/.hi.",
|
|
586
|
+
"properties": {
|
|
587
|
+
"severity": {
|
|
588
|
+
"type": "number"
|
|
589
|
+
},
|
|
590
|
+
"successes": {
|
|
591
|
+
"type": "integer"
|
|
592
|
+
},
|
|
593
|
+
"trials": {
|
|
594
|
+
"type": "integer"
|
|
595
|
+
},
|
|
596
|
+
"rate": {
|
|
597
|
+
"type": "number"
|
|
598
|
+
},
|
|
599
|
+
"lo": {
|
|
600
|
+
"type": "number"
|
|
601
|
+
},
|
|
602
|
+
"hi": {
|
|
603
|
+
"type": "number"
|
|
604
|
+
},
|
|
605
|
+
"level": {
|
|
606
|
+
"type": "number",
|
|
607
|
+
"exclusiveMinimum": 0,
|
|
608
|
+
"exclusiveMaximum": 1
|
|
609
|
+
},
|
|
610
|
+
"method": {
|
|
611
|
+
"type": "string",
|
|
612
|
+
"const": "per_cell_clopper_pearson"
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
"required": [
|
|
616
|
+
"severity",
|
|
617
|
+
"successes",
|
|
618
|
+
"trials",
|
|
619
|
+
"rate",
|
|
620
|
+
"lo",
|
|
621
|
+
"hi"
|
|
622
|
+
],
|
|
623
|
+
"additionalProperties": false
|
|
624
|
+
},
|
|
625
|
+
"Diagnostics": {
|
|
626
|
+
"type": "object",
|
|
627
|
+
"description": "robustmargin.Diagnostics: model-only fit diagnostics -- goodness of fit, dispersion and link comparison, reported and never acted on automatically (the monotonicity check is not part of this type: it lives on MonotonicityCheck). An untagged helper, like BaselineRate: it appears only as Fit.diagnostics, and only when that Fit's own status is OK.",
|
|
628
|
+
"properties": {
|
|
629
|
+
"deviance": {
|
|
630
|
+
"type": [
|
|
631
|
+
"number",
|
|
632
|
+
"null"
|
|
633
|
+
]
|
|
634
|
+
},
|
|
635
|
+
"pearson_chi2": {
|
|
636
|
+
"type": [
|
|
637
|
+
"number",
|
|
638
|
+
"null"
|
|
639
|
+
]
|
|
640
|
+
},
|
|
641
|
+
"df": {
|
|
642
|
+
"type": "integer"
|
|
643
|
+
},
|
|
644
|
+
"dispersion": {
|
|
645
|
+
"type": [
|
|
646
|
+
"number",
|
|
647
|
+
"null"
|
|
648
|
+
]
|
|
649
|
+
},
|
|
650
|
+
"link_aic": {
|
|
651
|
+
"type": "object",
|
|
652
|
+
"additionalProperties": {
|
|
653
|
+
"type": [
|
|
654
|
+
"number",
|
|
655
|
+
"null"
|
|
656
|
+
]
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
"link_status": {
|
|
660
|
+
"type": "object",
|
|
661
|
+
"additionalProperties": {
|
|
662
|
+
"$ref": "#/$defs/Status"
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
"warnings": {
|
|
666
|
+
"type": "array",
|
|
667
|
+
"items": {
|
|
668
|
+
"type": "string"
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"required": [
|
|
673
|
+
"deviance",
|
|
674
|
+
"pearson_chi2",
|
|
675
|
+
"df",
|
|
676
|
+
"dispersion",
|
|
677
|
+
"link_aic",
|
|
678
|
+
"link_status"
|
|
679
|
+
],
|
|
680
|
+
"additionalProperties": false
|
|
681
|
+
},
|
|
682
|
+
"AdjacentPair": {
|
|
683
|
+
"type": "object",
|
|
684
|
+
"description": "robustmargin.AdjacentPair: one adjacent-severity-level pair from a MonotonicityCheck, with its raw counts, one-sided Fisher exact p-value and Holm-adjusted p-value.",
|
|
685
|
+
"properties": {
|
|
686
|
+
"severity_low": {
|
|
687
|
+
"type": "number"
|
|
688
|
+
},
|
|
689
|
+
"severity_high": {
|
|
690
|
+
"type": "number"
|
|
691
|
+
},
|
|
692
|
+
"successes_low": {
|
|
693
|
+
"type": "integer"
|
|
694
|
+
},
|
|
695
|
+
"trials_low": {
|
|
696
|
+
"type": "integer"
|
|
697
|
+
},
|
|
698
|
+
"successes_high": {
|
|
699
|
+
"type": "integer"
|
|
700
|
+
},
|
|
701
|
+
"trials_high": {
|
|
702
|
+
"type": "integer"
|
|
703
|
+
},
|
|
704
|
+
"p_value": {
|
|
705
|
+
"type": "number"
|
|
706
|
+
},
|
|
707
|
+
"holm_adjusted_p": {
|
|
708
|
+
"type": "number"
|
|
709
|
+
},
|
|
710
|
+
"flagged": {
|
|
711
|
+
"type": "boolean"
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
"required": [
|
|
715
|
+
"severity_low",
|
|
716
|
+
"severity_high",
|
|
717
|
+
"successes_low",
|
|
718
|
+
"trials_low",
|
|
719
|
+
"successes_high",
|
|
720
|
+
"trials_high",
|
|
721
|
+
"p_value",
|
|
722
|
+
"holm_adjusted_p",
|
|
723
|
+
"flagged"
|
|
724
|
+
],
|
|
725
|
+
"additionalProperties": false
|
|
726
|
+
},
|
|
727
|
+
"MonotonicityCheck": {
|
|
728
|
+
"type": "object",
|
|
729
|
+
"description": "robustmargin.MonotonicityCheck: a data-only adjacent-level monotonicity check on raw counts -- populated on every fit_dose_response return path, whatever the Status, since it needs only counts, never a fitted curve. An untagged helper, like BaselineRate: it appears only as Fit.monotonicity.",
|
|
730
|
+
"properties": {
|
|
731
|
+
"direction": {
|
|
732
|
+
"enum": [
|
|
733
|
+
"decreasing",
|
|
734
|
+
"increasing"
|
|
735
|
+
]
|
|
736
|
+
},
|
|
737
|
+
"alpha": {
|
|
738
|
+
"type": "number",
|
|
739
|
+
"exclusiveMinimum": 0,
|
|
740
|
+
"exclusiveMaximum": 1
|
|
741
|
+
},
|
|
742
|
+
"dependence": {
|
|
743
|
+
"enum": [
|
|
744
|
+
"independent"
|
|
745
|
+
]
|
|
746
|
+
},
|
|
747
|
+
"pairs": {
|
|
748
|
+
"type": "array",
|
|
749
|
+
"items": {
|
|
750
|
+
"$ref": "#/$defs/AdjacentPair"
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
"any_flagged": {
|
|
754
|
+
"type": "boolean"
|
|
755
|
+
},
|
|
756
|
+
"method": {
|
|
757
|
+
"type": "string",
|
|
758
|
+
"const": "fisher_exact_one_sided_holm"
|
|
759
|
+
},
|
|
760
|
+
"warnings": {
|
|
761
|
+
"type": "array",
|
|
762
|
+
"items": {
|
|
763
|
+
"type": "string"
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
"required": [
|
|
768
|
+
"direction",
|
|
769
|
+
"alpha",
|
|
770
|
+
"dependence",
|
|
771
|
+
"pairs",
|
|
772
|
+
"any_flagged"
|
|
773
|
+
],
|
|
774
|
+
"additionalProperties": false
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|