@elaraai/e3-ui 1.0.102 → 1.0.104
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.
- package/dist/src/allocation/functions.d.ts +2 -1
- package/dist/src/allocation/functions.d.ts.map +1 -1
- package/dist/src/allocation/functions.js +3 -2
- package/dist/src/allocation/functions.js.map +1 -1
- package/dist/src/allocation/index.d.ts +120 -1
- package/dist/src/allocation/index.d.ts.map +1 -1
- package/dist/src/allocation/index.js +24 -4
- package/dist/src/allocation/index.js.map +1 -1
- package/dist/src/bind/data-indexed.d.ts +25 -4
- package/dist/src/bind/data-indexed.d.ts.map +1 -1
- package/dist/src/bind/data-indexed.js +58 -7
- package/dist/src/bind/data-indexed.js.map +1 -1
- package/dist/src/bind/data.d.ts +12 -14
- package/dist/src/bind/data.d.ts.map +1 -1
- package/dist/src/bind/data.js +11 -11
- package/dist/src/bind/data.js.map +1 -1
- package/dist/src/bind/func.d.ts +7 -2
- package/dist/src/bind/func.d.ts.map +1 -1
- package/dist/src/bind/func.js +10 -3
- package/dist/src/bind/func.js.map +1 -1
- package/dist/src/bind/record.d.ts +6 -6
- package/dist/src/bind/record.d.ts.map +1 -1
- package/dist/src/bind/record.js.map +1 -1
- package/dist/src/calendar/index.d.ts +148 -1
- package/dist/src/calendar/index.d.ts.map +1 -1
- package/dist/src/calendar/index.js +55 -5
- package/dist/src/calendar/index.js.map +1 -1
- package/dist/src/decision/bind.d.ts.map +1 -1
- package/dist/src/decision/index.d.ts +218 -218
- package/dist/src/decision/index.d.ts.map +1 -1
- package/dist/src/decision/types.d.ts.map +1 -1
- package/dist/src/flowchart/canvas.d.ts +32 -14
- package/dist/src/flowchart/canvas.d.ts.map +1 -1
- package/dist/src/flowchart/canvas.js +21 -6
- package/dist/src/flowchart/canvas.js.map +1 -1
- package/dist/src/flowchart/details.d.ts +469 -0
- package/dist/src/flowchart/details.d.ts.map +1 -0
- package/dist/src/flowchart/details.js +1035 -0
- package/dist/src/flowchart/details.js.map +1 -0
- package/dist/src/flowchart/flowchart.d.ts +16 -72
- package/dist/src/flowchart/flowchart.d.ts.map +1 -1
- package/dist/src/flowchart/flowchart.js +10 -1
- package/dist/src/flowchart/flowchart.js.map +1 -1
- package/dist/src/flowchart/index.d.ts +282 -251
- package/dist/src/flowchart/index.d.ts.map +1 -1
- package/dist/src/flowchart/index.js +234 -220
- package/dist/src/flowchart/index.js.map +1 -1
- package/dist/src/flowchart/kinds.d.ts +438 -0
- package/dist/src/flowchart/kinds.d.ts.map +1 -0
- package/dist/src/flowchart/kinds.js +799 -0
- package/dist/src/flowchart/kinds.js.map +1 -0
- package/dist/src/flowchart/library.d.ts +155 -740
- package/dist/src/flowchart/library.d.ts.map +1 -1
- package/dist/src/flowchart/library.js +191 -673
- package/dist/src/flowchart/library.js.map +1 -1
- package/dist/src/flowchart/payload.d.ts +3654 -7845
- package/dist/src/flowchart/payload.d.ts.map +1 -1
- package/dist/src/flowchart/payload.js +331 -469
- package/dist/src/flowchart/payload.js.map +1 -1
- package/dist/src/flowchart/templates.d.ts +657 -0
- package/dist/src/flowchart/templates.d.ts.map +1 -0
- package/dist/src/flowchart/templates.js +658 -0
- package/dist/src/flowchart/templates.js.map +1 -0
- package/dist/src/flowchart/types.d.ts +2258 -214
- package/dist/src/flowchart/types.d.ts.map +1 -1
- package/dist/src/flowchart/types.js +374 -124
- package/dist/src/flowchart/types.js.map +1 -1
- package/dist/src/index.d.ts +13 -15
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +24 -29
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +5 -7
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +12 -19
- package/dist/src/internal.js.map +1 -1
- package/dist/src/ontology/index.d.ts +44 -15
- package/dist/src/ontology/index.d.ts.map +1 -1
- package/dist/src/ontology/index.js +19 -11
- package/dist/src/ontology/index.js.map +1 -1
- package/dist/src/plan/builders.d.ts +26 -26
- package/dist/src/plan/builders.d.ts.map +1 -1
- package/dist/src/plan/builders.js.map +1 -1
- package/dist/src/plan/event-rows.d.ts +59 -58
- package/dist/src/plan/event-rows.d.ts.map +1 -1
- package/dist/src/plan/event-rows.js +6 -4
- package/dist/src/plan/event-rows.js.map +1 -1
- package/dist/src/plan/factories.js.map +1 -1
- package/dist/src/plan/ir.d.ts +1 -0
- package/dist/src/plan/ir.d.ts.map +1 -1
- package/dist/src/plan/library.d.ts.map +1 -1
- package/dist/src/plan/nested-checks.js.map +1 -1
- package/dist/src/plan/plan.d.ts +567 -423
- package/dist/src/plan/plan.d.ts.map +1 -1
- package/dist/src/plan/plan.js +67 -3
- package/dist/src/plan/plan.js.map +1 -1
- package/dist/src/plan/series.d.ts.map +1 -1
- package/dist/src/plan/series.js.map +1 -1
- package/dist/src/plan/types.d.ts +173 -172
- package/dist/src/plan/types.d.ts.map +1 -1
- package/dist/src/query/builder.d.ts +368 -321
- package/dist/src/query/builder.d.ts.map +1 -1
- package/dist/src/query/builder.js +12 -1
- package/dist/src/query/builder.js.map +1 -1
- package/dist/src/query/index.d.ts +5 -1
- package/dist/src/query/index.d.ts.map +1 -1
- package/dist/src/query/index.js +3 -1
- package/dist/src/query/index.js.map +1 -1
- package/dist/src/query/library.d.ts +6 -6
- package/dist/src/query/queries.d.ts +3 -3
- package/dist/src/roster/fit.d.ts +5 -2
- package/dist/src/roster/fit.d.ts.map +1 -1
- package/dist/src/roster/fit.js +5 -3
- package/dist/src/roster/fit.js.map +1 -1
- package/dist/src/roster/index.d.ts +103 -2
- package/dist/src/roster/index.d.ts.map +1 -1
- package/dist/src/roster/index.js +45 -6
- package/dist/src/roster/index.js.map +1 -1
- package/dist/src/runtime/index.d.ts +1 -3
- package/dist/src/runtime/index.d.ts.map +1 -1
- package/dist/src/runtime/index.js +1 -3
- package/dist/src/runtime/index.js.map +1 -1
- package/dist/src/schedule/fields.js.map +1 -1
- package/dist/src/schedule/library.js.map +1 -1
- package/dist/src/schedule/record-window.d.ts +27 -26
- package/dist/src/schedule/record-window.d.ts.map +1 -1
- package/dist/src/schedule/types.d.ts +196 -196
- package/dist/src/schematic/index.d.ts +1 -1
- package/dist/src/schematic/index.d.ts.map +1 -1
- package/dist/src/schematic/index.js +1 -1
- package/dist/src/schematic/index.js.map +1 -1
- package/dist/src/schematic/kinds.d.ts +4 -24
- package/dist/src/schematic/kinds.d.ts.map +1 -1
- package/dist/src/schematic/kinds.js +8 -212
- package/dist/src/schematic/kinds.js.map +1 -1
- package/dist/src/schematic/library.d.ts.map +1 -1
- package/dist/src/schematic/payload.d.ts +1688 -1549
- package/dist/src/schematic/payload.d.ts.map +1 -1
- package/dist/src/schematic/payload.js +38 -1
- package/dist/src/schematic/payload.js.map +1 -1
- package/dist/src/schematic/shapes.d.ts.map +1 -1
- package/dist/src/schematic/types.d.ts +978 -978
- package/dist/src/schematic/types.d.ts.map +1 -1
- package/dist/src/schematic/types.js +4 -36
- package/dist/src/schematic/types.js.map +1 -1
- package/dist/src/schematic/window.d.ts +9 -42
- package/dist/src/schematic/window.d.ts.map +1 -1
- package/dist/src/schematic/window.js +10 -115
- package/dist/src/schematic/window.js.map +1 -1
- package/dist/src/sheet/actions.d.ts +388 -0
- package/dist/src/sheet/actions.d.ts.map +1 -0
- package/dist/src/sheet/actions.js +594 -0
- package/dist/src/sheet/actions.js.map +1 -0
- package/dist/src/sheet/bridge.d.ts +12 -1
- package/dist/src/sheet/bridge.d.ts.map +1 -1
- package/dist/src/sheet/bridge.js +30 -6
- package/dist/src/sheet/bridge.js.map +1 -1
- package/dist/src/sheet/columns.d.ts +5 -2
- package/dist/src/sheet/columns.d.ts.map +1 -1
- package/dist/src/sheet/columns.js.map +1 -1
- package/dist/src/sheet/draft-bridge.d.ts +9 -4
- package/dist/src/sheet/draft-bridge.d.ts.map +1 -1
- package/dist/src/sheet/draft-bridge.js +22 -7
- package/dist/src/sheet/draft-bridge.js.map +1 -1
- package/dist/src/sheet/editing-types.d.ts +71 -71
- package/dist/src/sheet/fields.d.ts +13 -0
- package/dist/src/sheet/fields.d.ts.map +1 -1
- package/dist/src/sheet/fields.js +3 -0
- package/dist/src/sheet/fields.js.map +1 -1
- package/dist/src/sheet/group.js.map +1 -1
- package/dist/src/sheet/index.d.ts +32 -2
- package/dist/src/sheet/index.d.ts.map +1 -1
- package/dist/src/sheet/index.js +18 -3
- package/dist/src/sheet/index.js.map +1 -1
- package/dist/src/sheet/library.d.ts +8 -0
- package/dist/src/sheet/library.d.ts.map +1 -1
- package/dist/src/sheet/library.js.map +1 -1
- package/dist/src/sheet/link.d.ts.map +1 -1
- package/dist/src/sheet/record.js.map +1 -1
- package/dist/src/sheet/root.d.ts +23 -1
- package/dist/src/sheet/root.d.ts.map +1 -1
- package/dist/src/sheet/root.js +40 -5
- package/dist/src/sheet/root.js.map +1 -1
- package/dist/src/sheet/sheet.d.ts +9332 -5621
- package/dist/src/sheet/sheet.d.ts.map +1 -1
- package/dist/src/sheet/sheet.js +41 -2
- package/dist/src/sheet/sheet.js.map +1 -1
- package/dist/src/sheet/templates.d.ts +4 -0
- package/dist/src/sheet/templates.d.ts.map +1 -1
- package/dist/src/sheet/types.d.ts +13020 -5839
- package/dist/src/sheet/types.d.ts.map +1 -1
- package/dist/src/sheet/types.js +114 -2
- package/dist/src/sheet/types.js.map +1 -1
- package/dist/src/studio/builder.d.ts +6 -6
- package/dist/src/studio/library.d.ts +9 -9
- package/dist/src/studio/pages.d.ts +6 -6
- package/dist/src/studio/publish.d.ts +3 -3
- package/dist/src/utils/derive.d.ts +1 -1
- package/dist/src/utils/derive.js +1 -1
- package/dist/src/utils/derive.js.map +1 -1
- package/dist/src/utils/key-visibility.d.ts +1 -1
- package/dist/src/utils/record-kind.d.ts +625 -0
- package/dist/src/utils/record-kind.d.ts.map +1 -0
- package/dist/src/utils/record-kind.js +450 -0
- package/dist/src/utils/record-kind.js.map +1 -0
- package/dist/src/utils/views.d.ts +55 -0
- package/dist/src/utils/views.d.ts.map +1 -0
- package/dist/src/utils/views.js +72 -0
- package/dist/src/utils/views.js.map +1 -0
- package/dist/src/utils/vocabulary.d.ts +48 -0
- package/dist/src/utils/vocabulary.d.ts.map +1 -0
- package/dist/src/utils/vocabulary.js +47 -0
- package/dist/src/utils/vocabulary.js.map +1 -0
- package/dist/test/allocation/allocation.examples.d.ts +3 -1
- package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
- package/dist/test/allocation/allocation.examples.js +81 -2
- package/dist/test/allocation/allocation.examples.js.map +1 -1
- package/dist/test/bind/data/data.examples.d.ts +1 -1
- package/dist/test/bind/func/func.examples.d.ts +19 -1
- package/dist/test/bind/func/func.examples.d.ts.map +1 -1
- package/dist/test/bind/func/func.examples.js +36 -1
- package/dist/test/bind/func/func.examples.js.map +1 -1
- package/dist/test/calendar/calendar.examples.d.ts +2 -0
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar.examples.js +80 -2
- package/dist/test/calendar/calendar.examples.js.map +1 -1
- package/dist/test/decision/queue.examples.d.ts +1 -0
- package/dist/test/decision/queue.examples.d.ts.map +1 -1
- package/dist/test/decision/queue.examples.js +12 -0
- package/dist/test/decision/queue.examples.js.map +1 -1
- package/dist/test/examples-package.d.ts.map +1 -1
- package/dist/test/examples-package.js +5 -4
- package/dist/test/examples-package.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +1250 -4605
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
- package/dist/test/flowchart/flowchart.examples.js +861 -512
- package/dist/test/flowchart/flowchart.examples.js.map +1 -1
- package/dist/test/ontology/ontology.examples.d.ts +2 -3
- package/dist/test/ontology/ontology.examples.d.ts.map +1 -1
- package/dist/test/ontology/ontology.examples.js +32 -21
- package/dist/test/ontology/ontology.examples.js.map +1 -1
- package/dist/test/plan/plan-events.examples.d.ts +1 -0
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-events.examples.js +44 -0
- package/dist/test/plan/plan-events.examples.js.map +1 -1
- package/dist/test/plan/plan-nested.examples.d.ts +15 -15
- package/dist/test/plan/plan-nested.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-nested.examples.js +5 -5
- package/dist/test/plan/plan-nested.examples.js.map +1 -1
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-records.examples.js +1 -1
- package/dist/test/plan/plan-records.examples.js.map +1 -1
- package/dist/test/plan/plan.examples.js.map +1 -1
- package/dist/test/query/query.examples.d.ts +2 -0
- package/dist/test/query/query.examples.d.ts.map +1 -1
- package/dist/test/query/query.examples.js +37 -1
- package/dist/test/query/query.examples.js.map +1 -1
- package/dist/test/roster/domain.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.d.ts +2 -0
- package/dist/test/roster/roster.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.js +76 -15
- package/dist/test/roster/roster.examples.js.map +1 -1
- package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic-records.examples.js +6 -4
- package/dist/test/schematic/schematic-records.examples.js.map +1 -1
- package/dist/test/schematic/schematic.examples.d.ts +1 -0
- package/dist/test/schematic/schematic.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic.examples.js +144 -0
- package/dist/test/schematic/schematic.examples.js.map +1 -1
- package/dist/test/sheet/sheet-actions.examples.d.ts +1264 -0
- package/dist/test/sheet/sheet-actions.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-actions.examples.js +394 -0
- package/dist/test/sheet/sheet-actions.examples.js.map +1 -0
- package/dist/test/sheet/sheet-records.examples.d.ts +1 -1
- package/dist/test/sheet/sheet.examples.d.ts +1 -0
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet.examples.js +77 -0
- package/dist/test/sheet/sheet.examples.js.map +1 -1
- package/dist/test/studio/studio.examples.d.ts +1 -0
- package/dist/test/studio/studio.examples.d.ts.map +1 -1
- package/dist/test/studio/studio.examples.js +18 -8
- package/dist/test/studio/studio.examples.js.map +1 -1
- package/package.json +14 -13
- package/dist/src/diff/index.d.ts +0 -407
- package/dist/src/diff/index.d.ts.map +0 -1
- package/dist/src/diff/index.js +0 -203
- package/dist/src/diff/index.js.map +0 -1
- package/dist/src/experiment/index.d.ts +0 -1033
- package/dist/src/experiment/index.d.ts.map +0 -1
- package/dist/src/experiment/index.js +0 -197
- package/dist/src/experiment/index.js.map +0 -1
- package/dist/src/experiment/types.d.ts +0 -1093
- package/dist/src/experiment/types.d.ts.map +0 -1
- package/dist/src/experiment/types.js +0 -423
- package/dist/src/experiment/types.js.map +0 -1
- package/dist/src/flowchart/over.d.ts +0 -227
- package/dist/src/flowchart/over.d.ts.map +0 -1
- package/dist/src/flowchart/over.js +0 -213
- package/dist/src/flowchart/over.js.map +0 -1
- package/dist/src/flowchart/patch.d.ts +0 -64
- package/dist/src/flowchart/patch.d.ts.map +0 -1
- package/dist/src/flowchart/patch.js +0 -67
- package/dist/src/flowchart/patch.js.map +0 -1
- package/dist/src/flowchart/values.d.ts +0 -271
- package/dist/src/flowchart/values.d.ts.map +0 -1
- package/dist/src/flowchart/values.js +0 -220
- package/dist/src/flowchart/values.js.map +0 -1
- package/dist/src/flowchart/window.d.ts +0 -306
- package/dist/src/flowchart/window.d.ts.map +0 -1
- package/dist/src/flowchart/window.js +0 -63
- package/dist/src/flowchart/window.js.map +0 -1
- package/dist/src/runtime/diff.d.ts +0 -36
- package/dist/src/runtime/diff.d.ts.map +0 -1
- package/dist/src/runtime/diff.js +0 -34
- package/dist/src/runtime/diff.js.map +0 -1
- package/dist/src/runtime/experiment.d.ts +0 -48
- package/dist/src/runtime/experiment.d.ts.map +0 -1
- package/dist/src/runtime/experiment.js +0 -10
- package/dist/src/runtime/experiment.js.map +0 -1
- package/dist/test/diff/diff.examples.d.ts +0 -313
- package/dist/test/diff/diff.examples.d.ts.map +0 -1
- package/dist/test/diff/diff.examples.js +0 -452
- package/dist/test/diff/diff.examples.js.map +0 -1
- package/dist/test/experiment/experiment.examples.d.ts +0 -1512
- package/dist/test/experiment/experiment.examples.d.ts.map +0 -1
- package/dist/test/experiment/experiment.examples.js +0 -609
- package/dist/test/experiment/experiment.examples.js.map +0 -1
|
@@ -1,1093 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
-
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* The `Experiment` render contract.
|
|
7
|
-
*
|
|
8
|
-
* These types are **replicated verbatim (snake_case)** from
|
|
9
|
-
* `east-py-datascience`'s `Causal.Types.*`, so the engine's `Causal.experiment`
|
|
10
|
-
* result unifies **structurally** with the component's binding — replicate, don't
|
|
11
|
-
* share (East type equality is structural; `e3-ui` never imports
|
|
12
|
-
* `east-py-datascience`). Keep these byte-identical to the datascience
|
|
13
|
-
* definitions — they are kept in sync by hand.
|
|
14
|
-
*
|
|
15
|
-
* The user edits an {@link ExperimentConfigType} (the staged "question + method")
|
|
16
|
-
* and **Apply** runs the one bound `experiment` function, which returns an
|
|
17
|
-
* {@link ExperimentResultType} — the naive vs adjusted effect, confounder
|
|
18
|
-
* balance, propensity overlap, a robustness summary, and an honesty
|
|
19
|
-
* {@link ExperimentVerdictType}. `adjusted` is `none` when the engine refuses.
|
|
20
|
-
*
|
|
21
|
-
* @packageDocumentation
|
|
22
|
-
*/
|
|
23
|
-
import { StructType, VariantType, OptionType, ArrayType, DictType, FloatType, IntegerType, BooleanType, StringType, NullType, DateTimeType, VectorType } from '@elaraai/east';
|
|
24
|
-
/** A confidence interval. */
|
|
25
|
-
export declare const CiType: StructType<{
|
|
26
|
-
readonly lower: FloatType;
|
|
27
|
-
readonly upper: FloatType;
|
|
28
|
-
}>;
|
|
29
|
-
/** Type alias for {@link CiType}. */
|
|
30
|
-
export type CiType = typeof CiType;
|
|
31
|
-
/** Inverse-propensity weighting scheme. */
|
|
32
|
-
export declare const WeightingSchemeType: VariantType<{
|
|
33
|
-
readonly ips_weight: NullType;
|
|
34
|
-
readonly ips_stabilized_weight: NullType;
|
|
35
|
-
readonly ips_normalized_weight: NullType;
|
|
36
|
-
}>;
|
|
37
|
-
/** Type alias for {@link WeightingSchemeType}. */
|
|
38
|
-
export type WeightingSchemeType = typeof WeightingSchemeType;
|
|
39
|
-
/** Backdoor-adjusted effect estimator. */
|
|
40
|
-
export declare const EstimatorType: VariantType<{
|
|
41
|
-
readonly linear_regression: NullType;
|
|
42
|
-
readonly propensity_score_weighting: StructType<{
|
|
43
|
-
readonly weighting_scheme: OptionType<VariantType<{
|
|
44
|
-
readonly ips_weight: NullType;
|
|
45
|
-
readonly ips_stabilized_weight: NullType;
|
|
46
|
-
readonly ips_normalized_weight: NullType;
|
|
47
|
-
}>>;
|
|
48
|
-
}>;
|
|
49
|
-
}>;
|
|
50
|
-
/** Type alias for {@link EstimatorType}. */
|
|
51
|
-
export type EstimatorType = typeof EstimatorType;
|
|
52
|
-
/** Population the effect is reported for. */
|
|
53
|
-
export declare const TargetUnitsType: VariantType<{
|
|
54
|
-
readonly ate: NullType;
|
|
55
|
-
readonly att: NullType;
|
|
56
|
-
readonly atc: NullType;
|
|
57
|
-
}>;
|
|
58
|
-
/** Type alias for {@link TargetUnitsType}. */
|
|
59
|
-
export type TargetUnitsType = typeof TargetUnitsType;
|
|
60
|
-
/**
|
|
61
|
-
* A directional prior on the effect — the sign a domain expert expects. Drives the
|
|
62
|
-
* `expected_sign` guard.
|
|
63
|
-
* twin: east-py-datascience causal.ts `CausalSignType`
|
|
64
|
-
*/
|
|
65
|
-
export declare const SignType: VariantType<{
|
|
66
|
-
readonly positive: NullType;
|
|
67
|
-
readonly negative: NullType;
|
|
68
|
-
}>;
|
|
69
|
-
/** Type alias for {@link SignType}. */
|
|
70
|
-
export type SignType = typeof SignType;
|
|
71
|
-
/** Bootstrap confidence-interval configuration. */
|
|
72
|
-
export declare const BootstrapConfigType: StructType<{
|
|
73
|
-
readonly reps: IntegerType;
|
|
74
|
-
readonly cluster_column: OptionType<StringType>;
|
|
75
|
-
readonly confidence_level: OptionType<FloatType>;
|
|
76
|
-
}>;
|
|
77
|
-
/** Type alias for {@link BootstrapConfigType}. */
|
|
78
|
-
export type BootstrapConfigType = typeof BootstrapConfigType;
|
|
79
|
-
/** Which robustness checks to run. */
|
|
80
|
-
export declare const RefuteSpecType: StructType<{
|
|
81
|
-
/** Permuted-treatment negative control — a real effect should vanish. */
|
|
82
|
-
readonly placebo: BooleanType;
|
|
83
|
-
/** Inject an independent random common cause — the effect should hold. */
|
|
84
|
-
readonly random_common_cause: BooleanType;
|
|
85
|
-
/** Re-estimate on random subsamples — the effect should be stable. */
|
|
86
|
-
readonly data_subset: BooleanType;
|
|
87
|
-
/** Unobserved-confounder strengths to simulate → the sensitivity / tipping curve. */
|
|
88
|
-
readonly sensitivity: OptionType<ArrayType<FloatType>>;
|
|
89
|
-
}>;
|
|
90
|
-
/** Type alias for {@link RefuteSpecType}. */
|
|
91
|
-
export type RefuteSpecType = typeof RefuteSpecType;
|
|
92
|
-
/**
|
|
93
|
-
* The experiment the user framed — the staged value the pickers write and
|
|
94
|
-
* **Apply** feeds to the bound `experiment` function.
|
|
95
|
-
*
|
|
96
|
-
* `treatment` / `outcome` / `common_causes` / `categorical` are **column names**
|
|
97
|
-
* introspected from the bound dataset's row struct (the `Table` pattern). The
|
|
98
|
-
* `method` / `estimand` advanced choices and the `min_*` guard thresholds are
|
|
99
|
-
* optional developer-defaulted, user-adjustable knobs.
|
|
100
|
-
*/
|
|
101
|
-
export declare const ExperimentConfigType: StructType<{
|
|
102
|
-
readonly treatment: StringType;
|
|
103
|
-
readonly outcome: StringType;
|
|
104
|
-
readonly common_causes: ArrayType<StringType>;
|
|
105
|
-
readonly categorical: OptionType<ArrayType<StringType>>;
|
|
106
|
-
readonly method: OptionType<VariantType<{
|
|
107
|
-
readonly linear_regression: NullType;
|
|
108
|
-
readonly propensity_score_weighting: StructType<{
|
|
109
|
-
readonly weighting_scheme: OptionType<VariantType<{
|
|
110
|
-
readonly ips_weight: NullType;
|
|
111
|
-
readonly ips_stabilized_weight: NullType;
|
|
112
|
-
readonly ips_normalized_weight: NullType;
|
|
113
|
-
}>>;
|
|
114
|
-
}>;
|
|
115
|
-
}>>;
|
|
116
|
-
readonly estimand: OptionType<VariantType<{
|
|
117
|
-
readonly ate: NullType;
|
|
118
|
-
readonly att: NullType;
|
|
119
|
-
readonly atc: NullType;
|
|
120
|
-
}>>;
|
|
121
|
-
readonly refute: OptionType<StructType<{
|
|
122
|
-
/** Permuted-treatment negative control — a real effect should vanish. */
|
|
123
|
-
readonly placebo: BooleanType;
|
|
124
|
-
/** Inject an independent random common cause — the effect should hold. */
|
|
125
|
-
readonly random_common_cause: BooleanType;
|
|
126
|
-
/** Re-estimate on random subsamples — the effect should be stable. */
|
|
127
|
-
readonly data_subset: BooleanType;
|
|
128
|
-
/** Unobserved-confounder strengths to simulate → the sensitivity / tipping curve. */
|
|
129
|
-
readonly sensitivity: OptionType<ArrayType<FloatType>>;
|
|
130
|
-
}>>;
|
|
131
|
-
/** Continuous column for the ALE dose-response curve (the "How much?" view). */
|
|
132
|
-
readonly dose_feature: OptionType<StringType>;
|
|
133
|
-
readonly min_overlap: OptionType<FloatType>;
|
|
134
|
-
readonly min_treatment_variation: OptionType<FloatType>;
|
|
135
|
-
readonly bootstrap: OptionType<StructType<{
|
|
136
|
-
readonly reps: IntegerType;
|
|
137
|
-
readonly cluster_column: OptionType<StringType>;
|
|
138
|
-
readonly confidence_level: OptionType<FloatType>;
|
|
139
|
-
}>>;
|
|
140
|
-
readonly random_state: OptionType<IntegerType>;
|
|
141
|
-
/** Graded-overlap threshold — common support below this keeps `causal` from the
|
|
142
|
-
* top tier (verdict `modest`, `overlap.support_strength = thin`); default 0.55. */
|
|
143
|
-
readonly strong_overlap: OptionType<FloatType>;
|
|
144
|
-
/** Robustness floor — a `causal` verdict whose E-value is below this is downgraded to
|
|
145
|
-
* `modest`. Off by default. (E-value is a monotone transform of the standardized effect.) */
|
|
146
|
-
readonly evalue_floor: OptionType<FloatType>;
|
|
147
|
-
/** Directional prior — a material, CI-clear effect of the opposite sign is flagged
|
|
148
|
-
* (`expected_sign_ok = some(false)`, verdict `adjustment_insufficient`). Off by default. */
|
|
149
|
-
readonly expected_sign: OptionType<VariantType<{
|
|
150
|
-
readonly positive: NullType;
|
|
151
|
-
readonly negative: NullType;
|
|
152
|
-
}>>;
|
|
153
|
-
}>;
|
|
154
|
-
/** Type alias for {@link ExperimentConfigType}. */
|
|
155
|
-
export type ExperimentConfigType = typeof ExperimentConfigType;
|
|
156
|
-
/** One confounder's before-adjustment imbalance (categoricals → one row per level). */
|
|
157
|
-
export declare const BalanceRowType: StructType<{
|
|
158
|
-
readonly column: StringType;
|
|
159
|
-
/** The original confounder this row belongs to — equals `column` for a numeric
|
|
160
|
-
* confounder; the base confounder for a one-hot categorical level. */
|
|
161
|
-
readonly base_column: StringType;
|
|
162
|
-
readonly treated_mean: FloatType;
|
|
163
|
-
readonly control_mean: FloatType;
|
|
164
|
-
readonly std_diff: FloatType;
|
|
165
|
-
/** Post-adjustment SMD (weighted means, same pooled-sd denominator) — proof the
|
|
166
|
-
* adjustment closed the gap. `some` only for the propensity estimator with
|
|
167
|
-
* computable scores.
|
|
168
|
-
* twin: east-py-datascience BalanceRowType.std_diff_adjusted */
|
|
169
|
-
readonly std_diff_adjusted: OptionType<FloatType>;
|
|
170
|
-
}>;
|
|
171
|
-
/** Type alias for {@link BalanceRowType}. */
|
|
172
|
-
export type BalanceRowType = typeof BalanceRowType;
|
|
173
|
-
/** One observed confounder placed on the sensitivity strengths axis — the simulated
|
|
174
|
-
* strength whose effect-shift equals the shift from omitting that confounder, so
|
|
175
|
-
* "tips at 0.9" reads as "a hidden cause as strong as `column`".
|
|
176
|
-
* twin: east-py-datascience `SensitivityBenchmarkType` */
|
|
177
|
-
export declare const SensitivityBenchmarkType: StructType<{
|
|
178
|
-
readonly column: StringType;
|
|
179
|
-
readonly strength: FloatType;
|
|
180
|
-
}>;
|
|
181
|
-
/** Type alias for {@link SensitivityBenchmarkType}. */
|
|
182
|
-
export type SensitivityBenchmarkType = typeof SensitivityBenchmarkType;
|
|
183
|
-
/**
|
|
184
|
-
* Graded common-support tier — `refused` (below `min_overlap`), `thin` (clears the
|
|
185
|
-
* refuse gate but below `strong_overlap`), `strong` (≥ `strong_overlap`). Vacuously
|
|
186
|
-
* `strong` with no confounders.
|
|
187
|
-
* twin: east-py-datascience causal.ts `SupportStrengthType`
|
|
188
|
-
*/
|
|
189
|
-
export declare const SupportStrengthType: VariantType<{
|
|
190
|
-
readonly refused: NullType;
|
|
191
|
-
readonly thin: NullType;
|
|
192
|
-
readonly strong: NullType;
|
|
193
|
-
}>;
|
|
194
|
-
/** Type alias for {@link SupportStrengthType}. */
|
|
195
|
-
export type SupportStrengthType = typeof SupportStrengthType;
|
|
196
|
-
/** Positivity / common-support diagnostic (binary treatment). */
|
|
197
|
-
export declare const OverlapDiagnosticType: StructType<{
|
|
198
|
-
readonly treated_propensity: VectorType<FloatType>;
|
|
199
|
-
readonly control_propensity: VectorType<FloatType>;
|
|
200
|
-
readonly common_support_frac: FloatType;
|
|
201
|
-
/** Clears the **refuse** gate `min_overlap` — NOT a quality signal (true at the
|
|
202
|
-
* default 0.10 gate still means barely-overlapping). Read `support_strength`. */
|
|
203
|
-
readonly positivity_ok: BooleanType;
|
|
204
|
-
/** Graded common-support tier (`refused` / `thin` / `strong`).
|
|
205
|
-
* twin: datascience OverlapDiagnosticType.support_strength */
|
|
206
|
-
readonly support_strength: VariantType<{
|
|
207
|
-
readonly refused: NullType;
|
|
208
|
-
readonly thin: NullType;
|
|
209
|
-
readonly strong: NullType;
|
|
210
|
-
}>;
|
|
211
|
-
}>;
|
|
212
|
-
/** Type alias for {@link OverlapDiagnosticType}. */
|
|
213
|
-
export type OverlapDiagnosticType = typeof OverlapDiagnosticType;
|
|
214
|
-
/** The unobserved-confounder sensitivity (tipping) curve — effect at each simulated strength. */
|
|
215
|
-
export declare const SensitivityCurveType: StructType<{
|
|
216
|
-
readonly strengths: VectorType<FloatType>;
|
|
217
|
-
readonly effects: VectorType<FloatType>;
|
|
218
|
-
/** Observed-confounder benchmarks on the SAME strengths axis (empty when none is
|
|
219
|
-
* computable) — lets the surface say "survives a hidden cause as strong as
|
|
220
|
-
* `incoming_grade`". Clamped to the last simulated strength. */
|
|
221
|
-
readonly benchmarks: ArrayType<StructType<{
|
|
222
|
-
readonly column: StringType;
|
|
223
|
-
readonly strength: FloatType;
|
|
224
|
-
}>>;
|
|
225
|
-
}>;
|
|
226
|
-
/** Type alias for {@link SensitivityCurveType}. */
|
|
227
|
-
export type SensitivityCurveType = typeof SensitivityCurveType;
|
|
228
|
-
/** The robustness summary the verdict + trust tab consume. */
|
|
229
|
-
export declare const RefutationType: StructType<{
|
|
230
|
-
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
231
|
-
readonly placebo_effect: OptionType<FloatType>;
|
|
232
|
-
/** Whether the placebo effect vanished. */
|
|
233
|
-
readonly placebo_passes: OptionType<BooleanType>;
|
|
234
|
-
/** Whether a decoy random common cause left the estimate inside its CI. */
|
|
235
|
-
readonly random_cc_within_ci: OptionType<BooleanType>;
|
|
236
|
-
/** Mean effect across data subsamples (stability). */
|
|
237
|
-
readonly data_subset_effect: OptionType<FloatType>;
|
|
238
|
-
/** Std of the effect across data subsamples. */
|
|
239
|
-
readonly data_subset_std: OptionType<FloatType>;
|
|
240
|
-
/** Closed-form E-value (risk-ratio scale) — confounder strength needed to explain the
|
|
241
|
-
* effect away. A monotone transform of the standardized effect (not independent of it). */
|
|
242
|
-
readonly robustness_value: OptionType<FloatType>;
|
|
243
|
-
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
244
|
-
readonly sensitivity: OptionType<StructType<{
|
|
245
|
-
readonly strengths: VectorType<FloatType>;
|
|
246
|
-
readonly effects: VectorType<FloatType>;
|
|
247
|
-
/** Observed-confounder benchmarks on the SAME strengths axis (empty when none is
|
|
248
|
-
* computable) — lets the surface say "survives a hidden cause as strong as
|
|
249
|
-
* `incoming_grade`". Clamped to the last simulated strength. */
|
|
250
|
-
readonly benchmarks: ArrayType<StructType<{
|
|
251
|
-
readonly column: StringType;
|
|
252
|
-
readonly strength: FloatType;
|
|
253
|
-
}>>;
|
|
254
|
-
}>>;
|
|
255
|
-
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a material
|
|
256
|
-
* effect matches the expected direction, `some(false)` if it points the other way,
|
|
257
|
-
* `none` when no prior or the effect is near-zero.
|
|
258
|
-
* twin: datascience RefutationType.expected_sign_ok */
|
|
259
|
-
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
260
|
-
}>;
|
|
261
|
-
/** Type alias for {@link RefutationType}. */
|
|
262
|
-
export type RefutationType = typeof RefutationType;
|
|
263
|
-
/** A dose-response (ALE) curve of a continuous feature on the outcome. */
|
|
264
|
-
export declare const DoseResponseType: StructType<{
|
|
265
|
-
readonly feature: StringType;
|
|
266
|
-
readonly grid: VectorType<FloatType>;
|
|
267
|
-
readonly effect: VectorType<FloatType>;
|
|
268
|
-
readonly lower: OptionType<VectorType<FloatType>>;
|
|
269
|
-
readonly upper: OptionType<VectorType<FloatType>>;
|
|
270
|
-
/** Rows per dose bin — drives the surface's "you are here" (busiest bin) marker. */
|
|
271
|
-
readonly size: VectorType<IntegerType>;
|
|
272
|
-
}>;
|
|
273
|
-
/** Type alias for {@link DoseResponseType}. */
|
|
274
|
-
export type DoseResponseType = typeof DoseResponseType;
|
|
275
|
-
/**
|
|
276
|
-
* The honesty verdict — a thin tag; the numbers live top-level on the result.
|
|
277
|
-
* Only `not_estimable` carries a human-readable reason.
|
|
278
|
-
*/
|
|
279
|
-
export declare const ExperimentVerdictType: VariantType<{
|
|
280
|
-
readonly causal: NullType;
|
|
281
|
-
readonly modest: NullType;
|
|
282
|
-
readonly adjustment_insufficient: NullType;
|
|
283
|
-
readonly non_identifiable_positivity: NullType;
|
|
284
|
-
readonly not_estimable: StringType;
|
|
285
|
-
}>;
|
|
286
|
-
/** Type alias for {@link ExperimentVerdictType}. */
|
|
287
|
-
export type ExperimentVerdictType = typeof ExperimentVerdictType;
|
|
288
|
-
/**
|
|
289
|
-
* Machine-readable reason a verdict fell short of `causal` — every FAILING gate
|
|
290
|
-
* (the verdict tag is chosen by severity precedence, but explaining "why modest?"
|
|
291
|
-
* needs all of them). Empty for `causal` and for the two refusal verdicts.
|
|
292
|
-
* twin: east-py-datascience `VerdictReasonType`
|
|
293
|
-
*/
|
|
294
|
-
export declare const VerdictReasonType: VariantType<{
|
|
295
|
-
/** The placebo (shuffle) refuter didn't collapse to ~0. */
|
|
296
|
-
readonly placebo_failed: NullType;
|
|
297
|
-
/** |effect| below the materiality band (0.10 × outcome_sd). */
|
|
298
|
-
readonly not_material: NullType;
|
|
299
|
-
/** The adjusted CI straddles zero. */
|
|
300
|
-
readonly ci_spans_zero: NullType;
|
|
301
|
-
/** Material + CI-clear but pointing against `config.expected_sign`. */
|
|
302
|
-
readonly wrong_sign: NullType;
|
|
303
|
-
/** Common support cleared the refuse gate but is below `strong_overlap`. */
|
|
304
|
-
readonly thin_support: NullType;
|
|
305
|
-
/** E-value below the (opt-in) `evalue_floor`. */
|
|
306
|
-
readonly low_robustness: NullType;
|
|
307
|
-
}>;
|
|
308
|
-
/** Type alias for {@link VerdictReasonType}. */
|
|
309
|
-
export type VerdictReasonType = typeof VerdictReasonType;
|
|
310
|
-
/** The adjusted (like-for-like) effect + its CI — `none` on the result when the engine refuses. */
|
|
311
|
-
export declare const AdjustedEffectType: StructType<{
|
|
312
|
-
readonly effect: FloatType;
|
|
313
|
-
readonly ci: OptionType<StructType<{
|
|
314
|
-
readonly lower: FloatType;
|
|
315
|
-
readonly upper: FloatType;
|
|
316
|
-
}>>;
|
|
317
|
-
}>;
|
|
318
|
-
/** Type alias for {@link AdjustedEffectType}. */
|
|
319
|
-
export type AdjustedEffectType = typeof AdjustedEffectType;
|
|
320
|
-
/**
|
|
321
|
-
* The complete, honest result. `adjusted` is `none` when the engine refuses
|
|
322
|
-
* (positivity / no-variation); the `verdict` tag carries the headline; every
|
|
323
|
-
* word/colour on the surface is derived from these numbers.
|
|
324
|
-
*/
|
|
325
|
-
export declare const ExperimentResultType: StructType<{
|
|
326
|
-
readonly naive: FloatType;
|
|
327
|
-
readonly naive_ci: OptionType<StructType<{
|
|
328
|
-
readonly lower: FloatType;
|
|
329
|
-
readonly upper: FloatType;
|
|
330
|
-
}>>;
|
|
331
|
-
readonly adjusted: OptionType<StructType<{
|
|
332
|
-
readonly effect: FloatType;
|
|
333
|
-
readonly ci: OptionType<StructType<{
|
|
334
|
-
readonly lower: FloatType;
|
|
335
|
-
readonly upper: FloatType;
|
|
336
|
-
}>>;
|
|
337
|
-
}>>;
|
|
338
|
-
readonly n_total: IntegerType;
|
|
339
|
-
readonly n_treated: IntegerType;
|
|
340
|
-
readonly n_control: IntegerType;
|
|
341
|
-
/** Rows OUTSIDE the propensity common support — units with no like-for-like
|
|
342
|
-
* counterpart on the other side. Display-only; nothing is dropped. */
|
|
343
|
-
readonly n_dropped: IntegerType;
|
|
344
|
-
readonly balance: ArrayType<StructType<{
|
|
345
|
-
readonly column: StringType;
|
|
346
|
-
/** The original confounder this row belongs to — equals `column` for a numeric
|
|
347
|
-
* confounder; the base confounder for a one-hot categorical level. */
|
|
348
|
-
readonly base_column: StringType;
|
|
349
|
-
readonly treated_mean: FloatType;
|
|
350
|
-
readonly control_mean: FloatType;
|
|
351
|
-
readonly std_diff: FloatType;
|
|
352
|
-
/** Post-adjustment SMD (weighted means, same pooled-sd denominator) — proof the
|
|
353
|
-
* adjustment closed the gap. `some` only for the propensity estimator with
|
|
354
|
-
* computable scores.
|
|
355
|
-
* twin: east-py-datascience BalanceRowType.std_diff_adjusted */
|
|
356
|
-
readonly std_diff_adjusted: OptionType<FloatType>;
|
|
357
|
-
}>>;
|
|
358
|
-
readonly overlap: StructType<{
|
|
359
|
-
readonly treated_propensity: VectorType<FloatType>;
|
|
360
|
-
readonly control_propensity: VectorType<FloatType>;
|
|
361
|
-
readonly common_support_frac: FloatType;
|
|
362
|
-
/** Clears the **refuse** gate `min_overlap` — NOT a quality signal (true at the
|
|
363
|
-
* default 0.10 gate still means barely-overlapping). Read `support_strength`. */
|
|
364
|
-
readonly positivity_ok: BooleanType;
|
|
365
|
-
/** Graded common-support tier (`refused` / `thin` / `strong`).
|
|
366
|
-
* twin: datascience OverlapDiagnosticType.support_strength */
|
|
367
|
-
readonly support_strength: VariantType<{
|
|
368
|
-
readonly refused: NullType;
|
|
369
|
-
readonly thin: NullType;
|
|
370
|
-
readonly strong: NullType;
|
|
371
|
-
}>;
|
|
372
|
-
}>;
|
|
373
|
-
readonly refutation: OptionType<StructType<{
|
|
374
|
-
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
375
|
-
readonly placebo_effect: OptionType<FloatType>;
|
|
376
|
-
/** Whether the placebo effect vanished. */
|
|
377
|
-
readonly placebo_passes: OptionType<BooleanType>;
|
|
378
|
-
/** Whether a decoy random common cause left the estimate inside its CI. */
|
|
379
|
-
readonly random_cc_within_ci: OptionType<BooleanType>;
|
|
380
|
-
/** Mean effect across data subsamples (stability). */
|
|
381
|
-
readonly data_subset_effect: OptionType<FloatType>;
|
|
382
|
-
/** Std of the effect across data subsamples. */
|
|
383
|
-
readonly data_subset_std: OptionType<FloatType>;
|
|
384
|
-
/** Closed-form E-value (risk-ratio scale) — confounder strength needed to explain the
|
|
385
|
-
* effect away. A monotone transform of the standardized effect (not independent of it). */
|
|
386
|
-
readonly robustness_value: OptionType<FloatType>;
|
|
387
|
-
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
388
|
-
readonly sensitivity: OptionType<StructType<{
|
|
389
|
-
readonly strengths: VectorType<FloatType>;
|
|
390
|
-
readonly effects: VectorType<FloatType>;
|
|
391
|
-
/** Observed-confounder benchmarks on the SAME strengths axis (empty when none is
|
|
392
|
-
* computable) — lets the surface say "survives a hidden cause as strong as
|
|
393
|
-
* `incoming_grade`". Clamped to the last simulated strength. */
|
|
394
|
-
readonly benchmarks: ArrayType<StructType<{
|
|
395
|
-
readonly column: StringType;
|
|
396
|
-
readonly strength: FloatType;
|
|
397
|
-
}>>;
|
|
398
|
-
}>>;
|
|
399
|
-
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a material
|
|
400
|
-
* effect matches the expected direction, `some(false)` if it points the other way,
|
|
401
|
-
* `none` when no prior or the effect is near-zero.
|
|
402
|
-
* twin: datascience RefutationType.expected_sign_ok */
|
|
403
|
-
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
404
|
-
}>>;
|
|
405
|
-
/** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
|
|
406
|
-
readonly dose_response: OptionType<StructType<{
|
|
407
|
-
readonly feature: StringType;
|
|
408
|
-
readonly grid: VectorType<FloatType>;
|
|
409
|
-
readonly effect: VectorType<FloatType>;
|
|
410
|
-
readonly lower: OptionType<VectorType<FloatType>>;
|
|
411
|
-
readonly upper: OptionType<VectorType<FloatType>>;
|
|
412
|
-
/** Rows per dose bin — drives the surface's "you are here" (busiest bin) marker. */
|
|
413
|
-
readonly size: VectorType<IntegerType>;
|
|
414
|
-
}>>;
|
|
415
|
-
readonly verdict: VariantType<{
|
|
416
|
-
readonly causal: NullType;
|
|
417
|
-
readonly modest: NullType;
|
|
418
|
-
readonly adjustment_insufficient: NullType;
|
|
419
|
-
readonly non_identifiable_positivity: NullType;
|
|
420
|
-
readonly not_estimable: StringType;
|
|
421
|
-
}>;
|
|
422
|
-
/** Why the verdict fell short of `causal` — every failing gate (empty for
|
|
423
|
-
* `causal` and for the refusals, where the tag itself is the reason). */
|
|
424
|
-
readonly verdict_reasons: ArrayType<VariantType<{
|
|
425
|
-
/** The placebo (shuffle) refuter didn't collapse to ~0. */
|
|
426
|
-
readonly placebo_failed: NullType;
|
|
427
|
-
/** |effect| below the materiality band (0.10 × outcome_sd). */
|
|
428
|
-
readonly not_material: NullType;
|
|
429
|
-
/** The adjusted CI straddles zero. */
|
|
430
|
-
readonly ci_spans_zero: NullType;
|
|
431
|
-
/** Material + CI-clear but pointing against `config.expected_sign`. */
|
|
432
|
-
readonly wrong_sign: NullType;
|
|
433
|
-
/** Common support cleared the refuse gate but is below `strong_overlap`. */
|
|
434
|
-
readonly thin_support: NullType;
|
|
435
|
-
/** E-value below the (opt-in) `evalue_floor`. */
|
|
436
|
-
readonly low_robustness: NullType;
|
|
437
|
-
}>>;
|
|
438
|
-
/** The outcome's standard deviation — the scale the materiality band is on. */
|
|
439
|
-
readonly outcome_sd: FloatType;
|
|
440
|
-
/** The materiality band the verdict applied (0.10 × outcome_sd), echoed so the
|
|
441
|
-
* surface can say "smaller than what would matter here (±x)". */
|
|
442
|
-
readonly materiality_threshold: FloatType;
|
|
443
|
-
/** Raw outcome mean of the treated arm (`none` when the arm is empty). */
|
|
444
|
-
readonly treated_outcome_mean: OptionType<FloatType>;
|
|
445
|
-
/** Raw outcome mean of the control arm (`none` when the arm is empty). */
|
|
446
|
-
readonly control_outcome_mean: OptionType<FloatType>;
|
|
447
|
-
}>;
|
|
448
|
-
/** Type alias for {@link ExperimentResultType}. */
|
|
449
|
-
export type ExperimentResultType = typeof ExperimentResultType;
|
|
450
|
-
/**
|
|
451
|
-
* Why the trial is sized the way it is — set from the verdict, so the tab's
|
|
452
|
-
* headline + visuals change with the result rather than reading the same twice.
|
|
453
|
-
*/
|
|
454
|
-
export declare const DesignBasisType: VariantType<{
|
|
455
|
-
/** Clear effect → power the trial to detect the *observed* effect. */
|
|
456
|
-
readonly detect_observed: NullType;
|
|
457
|
-
/** Fuzzy / maybe-nothing → power to the smallest effect worth acting on. */
|
|
458
|
-
readonly resolve_vs_null: NullType;
|
|
459
|
-
/** A trust check failed → randomise to remove the bias adjustment couldn't. */
|
|
460
|
-
readonly de_bias: NullType;
|
|
461
|
-
/** No overlap → randomise within the comparable range. */
|
|
462
|
-
readonly restrict_to_overlap: NullType;
|
|
463
|
-
/** No control group exists → hold back a random sample next time. */
|
|
464
|
-
readonly create_control: NullType;
|
|
465
|
-
}>;
|
|
466
|
-
/** Type alias for {@link DesignBasisType}. */
|
|
467
|
-
export type DesignBasisType = typeof DesignBasisType;
|
|
468
|
-
/** One sizing option — a split and the head-count it needs (even split first). */
|
|
469
|
-
export declare const TrialOptionType: StructType<{
|
|
470
|
-
/** Plain label, e.g. "Even split" / "Treat fewer". */
|
|
471
|
-
readonly label: StringType;
|
|
472
|
-
/** Fraction assigned to the treatment (0..1; 0.5 = even). */
|
|
473
|
-
readonly treated_share: FloatType;
|
|
474
|
-
readonly n_treated: IntegerType;
|
|
475
|
-
readonly n_control: IntegerType;
|
|
476
|
-
readonly n_total: IntegerType;
|
|
477
|
-
}>;
|
|
478
|
-
/** Type alias for {@link TrialOptionType}. */
|
|
479
|
-
export type TrialOptionType = typeof TrialOptionType;
|
|
480
|
-
/** The "chance of detecting it" curve — total head-count → power (0..1). */
|
|
481
|
-
export declare const PowerCurveType: StructType<{
|
|
482
|
-
readonly n: VectorType<IntegerType>;
|
|
483
|
-
readonly power: VectorType<FloatType>;
|
|
484
|
-
}>;
|
|
485
|
-
/** Type alias for {@link PowerCurveType}. */
|
|
486
|
-
export type PowerCurveType = typeof PowerCurveType;
|
|
487
|
-
/**
|
|
488
|
-
* The validation-trial recipe — a randomised controlled trial sized from the
|
|
489
|
-
* observed effect (or the materiality threshold) and the outcome spread, with
|
|
490
|
-
* the groups matched on the confounders that were most imbalanced. Everything
|
|
491
|
-
* the "Validate" tab paints is derived from these fields.
|
|
492
|
-
*/
|
|
493
|
-
export declare const ExperimentDesignType: StructType<{
|
|
494
|
-
/** The verdict that drove the recommendation (echoed for framing). */
|
|
495
|
-
readonly verdict: VariantType<{
|
|
496
|
-
readonly causal: NullType;
|
|
497
|
-
readonly modest: NullType;
|
|
498
|
-
readonly adjustment_insufficient: NullType;
|
|
499
|
-
readonly non_identifiable_positivity: NullType;
|
|
500
|
-
readonly not_estimable: StringType;
|
|
501
|
-
}>;
|
|
502
|
-
readonly basis: VariantType<{
|
|
503
|
-
/** Clear effect → power the trial to detect the *observed* effect. */
|
|
504
|
-
readonly detect_observed: NullType;
|
|
505
|
-
/** Fuzzy / maybe-nothing → power to the smallest effect worth acting on. */
|
|
506
|
-
readonly resolve_vs_null: NullType;
|
|
507
|
-
/** A trust check failed → randomise to remove the bias adjustment couldn't. */
|
|
508
|
-
readonly de_bias: NullType;
|
|
509
|
-
/** No overlap → randomise within the comparable range. */
|
|
510
|
-
readonly restrict_to_overlap: NullType;
|
|
511
|
-
/** No control group exists → hold back a random sample next time. */
|
|
512
|
-
readonly create_control: NullType;
|
|
513
|
-
}>;
|
|
514
|
-
/** The effect size the trial is powered to detect (observed, or materiality). */
|
|
515
|
-
readonly target_effect: FloatType;
|
|
516
|
-
/** Outcome spread (pooled SD) used to size it. */
|
|
517
|
-
readonly outcome_sd: FloatType;
|
|
518
|
-
readonly target_power: FloatType;
|
|
519
|
-
readonly alpha: FloatType;
|
|
520
|
-
/** Chance the CURRENT sample would already detect `target_effect` (the "you're here" marker); `none` when there's no comparison group. */
|
|
521
|
-
readonly current_power: OptionType<FloatType>;
|
|
522
|
-
/** Categories both groups must be matched on (the most-imbalanced confounders). */
|
|
523
|
-
readonly match_on: ArrayType<StringType>;
|
|
524
|
-
/** Ranked split options (even split first; cost-saving alternates). */
|
|
525
|
-
readonly options: ArrayType<StructType<{
|
|
526
|
-
/** Plain label, e.g. "Even split" / "Treat fewer". */
|
|
527
|
-
readonly label: StringType;
|
|
528
|
-
/** Fraction assigned to the treatment (0..1; 0.5 = even). */
|
|
529
|
-
readonly treated_share: FloatType;
|
|
530
|
-
readonly n_treated: IntegerType;
|
|
531
|
-
readonly n_control: IntegerType;
|
|
532
|
-
readonly n_total: IntegerType;
|
|
533
|
-
}>>;
|
|
534
|
-
/** The detect-chance curve for the chart. */
|
|
535
|
-
readonly power_curve: StructType<{
|
|
536
|
-
readonly n: VectorType<IntegerType>;
|
|
537
|
-
readonly power: VectorType<FloatType>;
|
|
538
|
-
}>;
|
|
539
|
-
/** One generated, plain-language sentence framing the recipe. */
|
|
540
|
-
readonly rationale: StringType;
|
|
541
|
-
}>;
|
|
542
|
-
/** Type alias for {@link ExperimentDesignType}. */
|
|
543
|
-
export type ExperimentDesignType = typeof ExperimentDesignType;
|
|
544
|
-
/** Optional knobs `Causal.designValidation` accepts (all developer-defaulted). */
|
|
545
|
-
export declare const DesignConfigType: StructType<{
|
|
546
|
-
/** Significance level (default 0.05). */
|
|
547
|
-
readonly alpha: OptionType<FloatType>;
|
|
548
|
-
/** Target chance of detecting the effect (default 0.8). */
|
|
549
|
-
readonly target_power: OptionType<FloatType>;
|
|
550
|
-
/** Smallest effect worth acting on — sizes the trial to this when set / when there's no trustworthy observed effect. */
|
|
551
|
-
readonly materiality: OptionType<FloatType>;
|
|
552
|
-
/** Treatment shares to offer as options (default [0.5]). */
|
|
553
|
-
readonly treated_shares: OptionType<ArrayType<FloatType>>;
|
|
554
|
-
}>;
|
|
555
|
-
/** Type alias for {@link DesignConfigType}. */
|
|
556
|
-
export type DesignConfigType = typeof DesignConfigType;
|
|
557
|
-
/**
|
|
558
|
-
* The UI-side population filter — a set of {@link Slice} predicates the Step-4
|
|
559
|
-
* rail edits. It narrows the rows **client-side, before** the `experiment` call,
|
|
560
|
-
* so it is deliberately **not** a field of {@link ExperimentConfigType} (the
|
|
561
|
-
* bound function never sees it; the config stays byte-identical to the causal
|
|
562
|
-
* library's contract). Bound as its own optional staged dataset so a surface can
|
|
563
|
-
* seed / persist / commit the framing filters.
|
|
564
|
-
*/
|
|
565
|
-
export declare const PopulationType: ArrayType<VariantType<{
|
|
566
|
-
readonly string: import("@elaraai/east").StructType<{
|
|
567
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
568
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
569
|
-
readonly eq: import("@elaraai/east").StringType;
|
|
570
|
-
readonly neq: import("@elaraai/east").StringType;
|
|
571
|
-
readonly in: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
572
|
-
readonly notIn: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
573
|
-
readonly contains: import("@elaraai/east").StringType;
|
|
574
|
-
readonly matches: import("@elaraai/east").StringType;
|
|
575
|
-
readonly startsWith: import("@elaraai/east").StringType;
|
|
576
|
-
readonly endsWith: import("@elaraai/east").StringType;
|
|
577
|
-
readonly isEmpty: import("@elaraai/east").NullType;
|
|
578
|
-
readonly isNotEmpty: import("@elaraai/east").NullType;
|
|
579
|
-
}>;
|
|
580
|
-
}>;
|
|
581
|
-
readonly integer: import("@elaraai/east").StructType<{
|
|
582
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
583
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
584
|
-
readonly eq: import("@elaraai/east").IntegerType;
|
|
585
|
-
readonly neq: import("@elaraai/east").IntegerType;
|
|
586
|
-
readonly lt: import("@elaraai/east").IntegerType;
|
|
587
|
-
readonly lte: import("@elaraai/east").IntegerType;
|
|
588
|
-
readonly gt: import("@elaraai/east").IntegerType;
|
|
589
|
-
readonly gte: import("@elaraai/east").IntegerType;
|
|
590
|
-
readonly in: import("@elaraai/east").SetType<import("@elaraai/east").IntegerType>;
|
|
591
|
-
}>;
|
|
592
|
-
}>;
|
|
593
|
-
readonly float: import("@elaraai/east").StructType<{
|
|
594
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
595
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
596
|
-
readonly lt: import("@elaraai/east").FloatType;
|
|
597
|
-
readonly lte: import("@elaraai/east").FloatType;
|
|
598
|
-
readonly gt: import("@elaraai/east").FloatType;
|
|
599
|
-
readonly gte: import("@elaraai/east").FloatType;
|
|
600
|
-
}>;
|
|
601
|
-
}>;
|
|
602
|
-
readonly datetime: import("@elaraai/east").StructType<{
|
|
603
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
604
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
605
|
-
readonly before: import("@elaraai/east").DateTimeType;
|
|
606
|
-
readonly after: import("@elaraai/east").DateTimeType;
|
|
607
|
-
readonly between: import("@elaraai/east").StructType<{
|
|
608
|
-
readonly from: import("@elaraai/east").DateTimeType;
|
|
609
|
-
readonly to: import("@elaraai/east").DateTimeType;
|
|
610
|
-
}>;
|
|
611
|
-
}>;
|
|
612
|
-
}>;
|
|
613
|
-
readonly boolean: import("@elaraai/east").StructType<{
|
|
614
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
615
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
616
|
-
readonly is: import("@elaraai/east").BooleanType;
|
|
617
|
-
}>;
|
|
618
|
-
}>;
|
|
619
|
-
}>>;
|
|
620
|
-
/** Type alias for {@link PopulationType}. */
|
|
621
|
-
export type PopulationType = typeof PopulationType;
|
|
622
|
-
/**
|
|
623
|
-
* One developer-authored, vetted experiment configuration — a named question whose
|
|
624
|
-
* `spec` is loaded into the working config (and whose optional `population` sets the
|
|
625
|
-
* scope) when it is selected from the surface's question selector. A committed result
|
|
626
|
-
* records the originating configuration by `id`.
|
|
627
|
-
*
|
|
628
|
-
* A configuration bundles the **vetted backdoor set + scope** so a non-expert can pick a
|
|
629
|
-
* correct causal question from a menu rather than assemble one. `spec` is a full
|
|
630
|
-
* {@link ExperimentConfigType} (column names are plain strings); `population` is the
|
|
631
|
-
* optional Step-4 scope (`none` ⇒ no scope); `group` sections the selector. An entry may
|
|
632
|
-
* also carry a precomputed `result`/`design` so the surface paints an answer with no live
|
|
633
|
-
* call.
|
|
634
|
-
*/
|
|
635
|
-
export declare const ConfigurationType: StructType<{
|
|
636
|
-
/** Stable key — the journal records THIS (not `label`), and it drives selection
|
|
637
|
-
* identity, so a renamed `label` never orphans a committed row. */
|
|
638
|
-
readonly id: StringType;
|
|
639
|
-
/** Display title shown in the question selector. */
|
|
640
|
-
readonly label: StringType;
|
|
641
|
-
/** The causal question — the vetted, pre-baked {@link ExperimentConfigType} this
|
|
642
|
-
* entry frames (loaded into the working config when selected). */
|
|
643
|
-
readonly spec: StructType<{
|
|
644
|
-
readonly treatment: StringType;
|
|
645
|
-
readonly outcome: StringType;
|
|
646
|
-
readonly common_causes: ArrayType<StringType>;
|
|
647
|
-
readonly categorical: OptionType<ArrayType<StringType>>;
|
|
648
|
-
readonly method: OptionType<VariantType<{
|
|
649
|
-
readonly linear_regression: NullType;
|
|
650
|
-
readonly propensity_score_weighting: StructType<{
|
|
651
|
-
readonly weighting_scheme: OptionType<VariantType<{
|
|
652
|
-
readonly ips_weight: NullType;
|
|
653
|
-
readonly ips_stabilized_weight: NullType;
|
|
654
|
-
readonly ips_normalized_weight: NullType;
|
|
655
|
-
}>>;
|
|
656
|
-
}>;
|
|
657
|
-
}>>;
|
|
658
|
-
readonly estimand: OptionType<VariantType<{
|
|
659
|
-
readonly ate: NullType;
|
|
660
|
-
readonly att: NullType;
|
|
661
|
-
readonly atc: NullType;
|
|
662
|
-
}>>;
|
|
663
|
-
readonly refute: OptionType<StructType<{
|
|
664
|
-
/** Permuted-treatment negative control — a real effect should vanish. */
|
|
665
|
-
readonly placebo: BooleanType;
|
|
666
|
-
/** Inject an independent random common cause — the effect should hold. */
|
|
667
|
-
readonly random_common_cause: BooleanType;
|
|
668
|
-
/** Re-estimate on random subsamples — the effect should be stable. */
|
|
669
|
-
readonly data_subset: BooleanType;
|
|
670
|
-
/** Unobserved-confounder strengths to simulate → the sensitivity / tipping curve. */
|
|
671
|
-
readonly sensitivity: OptionType<ArrayType<FloatType>>;
|
|
672
|
-
}>>;
|
|
673
|
-
/** Continuous column for the ALE dose-response curve (the "How much?" view). */
|
|
674
|
-
readonly dose_feature: OptionType<StringType>;
|
|
675
|
-
readonly min_overlap: OptionType<FloatType>;
|
|
676
|
-
readonly min_treatment_variation: OptionType<FloatType>;
|
|
677
|
-
readonly bootstrap: OptionType<StructType<{
|
|
678
|
-
readonly reps: IntegerType;
|
|
679
|
-
readonly cluster_column: OptionType<StringType>;
|
|
680
|
-
readonly confidence_level: OptionType<FloatType>;
|
|
681
|
-
}>>;
|
|
682
|
-
readonly random_state: OptionType<IntegerType>;
|
|
683
|
-
/** Graded-overlap threshold — common support below this keeps `causal` from the
|
|
684
|
-
* top tier (verdict `modest`, `overlap.support_strength = thin`); default 0.55. */
|
|
685
|
-
readonly strong_overlap: OptionType<FloatType>;
|
|
686
|
-
/** Robustness floor — a `causal` verdict whose E-value is below this is downgraded to
|
|
687
|
-
* `modest`. Off by default. (E-value is a monotone transform of the standardized effect.) */
|
|
688
|
-
readonly evalue_floor: OptionType<FloatType>;
|
|
689
|
-
/** Directional prior — a material, CI-clear effect of the opposite sign is flagged
|
|
690
|
-
* (`expected_sign_ok = some(false)`, verdict `adjustment_insufficient`). Off by default. */
|
|
691
|
-
readonly expected_sign: OptionType<VariantType<{
|
|
692
|
-
readonly positive: NullType;
|
|
693
|
-
readonly negative: NullType;
|
|
694
|
-
}>>;
|
|
695
|
-
}>;
|
|
696
|
-
/** Optional population scope to apply on select; `none` ⇒ no scope. */
|
|
697
|
-
readonly population: OptionType<ArrayType<VariantType<{
|
|
698
|
-
readonly string: import("@elaraai/east").StructType<{
|
|
699
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
700
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
701
|
-
readonly eq: import("@elaraai/east").StringType;
|
|
702
|
-
readonly neq: import("@elaraai/east").StringType;
|
|
703
|
-
readonly in: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
704
|
-
readonly notIn: import("@elaraai/east").SetType<import("@elaraai/east").StringType>;
|
|
705
|
-
readonly contains: import("@elaraai/east").StringType;
|
|
706
|
-
readonly matches: import("@elaraai/east").StringType;
|
|
707
|
-
readonly startsWith: import("@elaraai/east").StringType;
|
|
708
|
-
readonly endsWith: import("@elaraai/east").StringType;
|
|
709
|
-
readonly isEmpty: import("@elaraai/east").NullType;
|
|
710
|
-
readonly isNotEmpty: import("@elaraai/east").NullType;
|
|
711
|
-
}>;
|
|
712
|
-
}>;
|
|
713
|
-
readonly integer: import("@elaraai/east").StructType<{
|
|
714
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
715
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
716
|
-
readonly eq: import("@elaraai/east").IntegerType;
|
|
717
|
-
readonly neq: import("@elaraai/east").IntegerType;
|
|
718
|
-
readonly lt: import("@elaraai/east").IntegerType;
|
|
719
|
-
readonly lte: import("@elaraai/east").IntegerType;
|
|
720
|
-
readonly gt: import("@elaraai/east").IntegerType;
|
|
721
|
-
readonly gte: import("@elaraai/east").IntegerType;
|
|
722
|
-
readonly in: import("@elaraai/east").SetType<import("@elaraai/east").IntegerType>;
|
|
723
|
-
}>;
|
|
724
|
-
}>;
|
|
725
|
-
readonly float: import("@elaraai/east").StructType<{
|
|
726
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
727
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
728
|
-
readonly lt: import("@elaraai/east").FloatType;
|
|
729
|
-
readonly lte: import("@elaraai/east").FloatType;
|
|
730
|
-
readonly gt: import("@elaraai/east").FloatType;
|
|
731
|
-
readonly gte: import("@elaraai/east").FloatType;
|
|
732
|
-
}>;
|
|
733
|
-
}>;
|
|
734
|
-
readonly datetime: import("@elaraai/east").StructType<{
|
|
735
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
736
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
737
|
-
readonly before: import("@elaraai/east").DateTimeType;
|
|
738
|
-
readonly after: import("@elaraai/east").DateTimeType;
|
|
739
|
-
readonly between: import("@elaraai/east").StructType<{
|
|
740
|
-
readonly from: import("@elaraai/east").DateTimeType;
|
|
741
|
-
readonly to: import("@elaraai/east").DateTimeType;
|
|
742
|
-
}>;
|
|
743
|
-
}>;
|
|
744
|
-
}>;
|
|
745
|
-
readonly boolean: import("@elaraai/east").StructType<{
|
|
746
|
-
readonly fieldId: import("@elaraai/east").StringType;
|
|
747
|
-
readonly op: import("@elaraai/east").VariantType<{
|
|
748
|
-
readonly is: import("@elaraai/east").BooleanType;
|
|
749
|
-
}>;
|
|
750
|
-
}>;
|
|
751
|
-
}>>>;
|
|
752
|
-
/** Optional section header — entries sharing a `group` are bucketed together. */
|
|
753
|
-
readonly group: OptionType<StringType>;
|
|
754
|
-
/** Optional precomputed answer for this question (e.g. a dataflow task ran
|
|
755
|
-
* `Causal.experiment` once). `none` ⇒ compute live via the `experiment` function. */
|
|
756
|
-
readonly result: OptionType<StructType<{
|
|
757
|
-
readonly naive: FloatType;
|
|
758
|
-
readonly naive_ci: OptionType<StructType<{
|
|
759
|
-
readonly lower: FloatType;
|
|
760
|
-
readonly upper: FloatType;
|
|
761
|
-
}>>;
|
|
762
|
-
readonly adjusted: OptionType<StructType<{
|
|
763
|
-
readonly effect: FloatType;
|
|
764
|
-
readonly ci: OptionType<StructType<{
|
|
765
|
-
readonly lower: FloatType;
|
|
766
|
-
readonly upper: FloatType;
|
|
767
|
-
}>>;
|
|
768
|
-
}>>;
|
|
769
|
-
readonly n_total: IntegerType;
|
|
770
|
-
readonly n_treated: IntegerType;
|
|
771
|
-
readonly n_control: IntegerType;
|
|
772
|
-
/** Rows OUTSIDE the propensity common support — units with no like-for-like
|
|
773
|
-
* counterpart on the other side. Display-only; nothing is dropped. */
|
|
774
|
-
readonly n_dropped: IntegerType;
|
|
775
|
-
readonly balance: ArrayType<StructType<{
|
|
776
|
-
readonly column: StringType;
|
|
777
|
-
/** The original confounder this row belongs to — equals `column` for a numeric
|
|
778
|
-
* confounder; the base confounder for a one-hot categorical level. */
|
|
779
|
-
readonly base_column: StringType;
|
|
780
|
-
readonly treated_mean: FloatType;
|
|
781
|
-
readonly control_mean: FloatType;
|
|
782
|
-
readonly std_diff: FloatType;
|
|
783
|
-
/** Post-adjustment SMD (weighted means, same pooled-sd denominator) — proof the
|
|
784
|
-
* adjustment closed the gap. `some` only for the propensity estimator with
|
|
785
|
-
* computable scores.
|
|
786
|
-
* twin: east-py-datascience BalanceRowType.std_diff_adjusted */
|
|
787
|
-
readonly std_diff_adjusted: OptionType<FloatType>;
|
|
788
|
-
}>>;
|
|
789
|
-
readonly overlap: StructType<{
|
|
790
|
-
readonly treated_propensity: VectorType<FloatType>;
|
|
791
|
-
readonly control_propensity: VectorType<FloatType>;
|
|
792
|
-
readonly common_support_frac: FloatType;
|
|
793
|
-
/** Clears the **refuse** gate `min_overlap` — NOT a quality signal (true at the
|
|
794
|
-
* default 0.10 gate still means barely-overlapping). Read `support_strength`. */
|
|
795
|
-
readonly positivity_ok: BooleanType;
|
|
796
|
-
/** Graded common-support tier (`refused` / `thin` / `strong`).
|
|
797
|
-
* twin: datascience OverlapDiagnosticType.support_strength */
|
|
798
|
-
readonly support_strength: VariantType<{
|
|
799
|
-
readonly refused: NullType;
|
|
800
|
-
readonly thin: NullType;
|
|
801
|
-
readonly strong: NullType;
|
|
802
|
-
}>;
|
|
803
|
-
}>;
|
|
804
|
-
readonly refutation: OptionType<StructType<{
|
|
805
|
-
/** Effect under a permuted (placebo) treatment — should be ≈ 0. */
|
|
806
|
-
readonly placebo_effect: OptionType<FloatType>;
|
|
807
|
-
/** Whether the placebo effect vanished. */
|
|
808
|
-
readonly placebo_passes: OptionType<BooleanType>;
|
|
809
|
-
/** Whether a decoy random common cause left the estimate inside its CI. */
|
|
810
|
-
readonly random_cc_within_ci: OptionType<BooleanType>;
|
|
811
|
-
/** Mean effect across data subsamples (stability). */
|
|
812
|
-
readonly data_subset_effect: OptionType<FloatType>;
|
|
813
|
-
/** Std of the effect across data subsamples. */
|
|
814
|
-
readonly data_subset_std: OptionType<FloatType>;
|
|
815
|
-
/** Closed-form E-value (risk-ratio scale) — confounder strength needed to explain the
|
|
816
|
-
* effect away. A monotone transform of the standardized effect (not independent of it). */
|
|
817
|
-
readonly robustness_value: OptionType<FloatType>;
|
|
818
|
-
/** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
|
|
819
|
-
readonly sensitivity: OptionType<StructType<{
|
|
820
|
-
readonly strengths: VectorType<FloatType>;
|
|
821
|
-
readonly effects: VectorType<FloatType>;
|
|
822
|
-
/** Observed-confounder benchmarks on the SAME strengths axis (empty when none is
|
|
823
|
-
* computable) — lets the surface say "survives a hidden cause as strong as
|
|
824
|
-
* `incoming_grade`". Clamped to the last simulated strength. */
|
|
825
|
-
readonly benchmarks: ArrayType<StructType<{
|
|
826
|
-
readonly column: StringType;
|
|
827
|
-
readonly strength: FloatType;
|
|
828
|
-
}>>;
|
|
829
|
-
}>>;
|
|
830
|
-
/** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a material
|
|
831
|
-
* effect matches the expected direction, `some(false)` if it points the other way,
|
|
832
|
-
* `none` when no prior or the effect is near-zero.
|
|
833
|
-
* twin: datascience RefutationType.expected_sign_ok */
|
|
834
|
-
readonly expected_sign_ok: OptionType<BooleanType>;
|
|
835
|
-
}>>;
|
|
836
|
-
/** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
|
|
837
|
-
readonly dose_response: OptionType<StructType<{
|
|
838
|
-
readonly feature: StringType;
|
|
839
|
-
readonly grid: VectorType<FloatType>;
|
|
840
|
-
readonly effect: VectorType<FloatType>;
|
|
841
|
-
readonly lower: OptionType<VectorType<FloatType>>;
|
|
842
|
-
readonly upper: OptionType<VectorType<FloatType>>;
|
|
843
|
-
/** Rows per dose bin — drives the surface's "you are here" (busiest bin) marker. */
|
|
844
|
-
readonly size: VectorType<IntegerType>;
|
|
845
|
-
}>>;
|
|
846
|
-
readonly verdict: VariantType<{
|
|
847
|
-
readonly causal: NullType;
|
|
848
|
-
readonly modest: NullType;
|
|
849
|
-
readonly adjustment_insufficient: NullType;
|
|
850
|
-
readonly non_identifiable_positivity: NullType;
|
|
851
|
-
readonly not_estimable: StringType;
|
|
852
|
-
}>;
|
|
853
|
-
/** Why the verdict fell short of `causal` — every failing gate (empty for
|
|
854
|
-
* `causal` and for the refusals, where the tag itself is the reason). */
|
|
855
|
-
readonly verdict_reasons: ArrayType<VariantType<{
|
|
856
|
-
/** The placebo (shuffle) refuter didn't collapse to ~0. */
|
|
857
|
-
readonly placebo_failed: NullType;
|
|
858
|
-
/** |effect| below the materiality band (0.10 × outcome_sd). */
|
|
859
|
-
readonly not_material: NullType;
|
|
860
|
-
/** The adjusted CI straddles zero. */
|
|
861
|
-
readonly ci_spans_zero: NullType;
|
|
862
|
-
/** Material + CI-clear but pointing against `config.expected_sign`. */
|
|
863
|
-
readonly wrong_sign: NullType;
|
|
864
|
-
/** Common support cleared the refuse gate but is below `strong_overlap`. */
|
|
865
|
-
readonly thin_support: NullType;
|
|
866
|
-
/** E-value below the (opt-in) `evalue_floor`. */
|
|
867
|
-
readonly low_robustness: NullType;
|
|
868
|
-
}>>;
|
|
869
|
-
/** The outcome's standard deviation — the scale the materiality band is on. */
|
|
870
|
-
readonly outcome_sd: FloatType;
|
|
871
|
-
/** The materiality band the verdict applied (0.10 × outcome_sd), echoed so the
|
|
872
|
-
* surface can say "smaller than what would matter here (±x)". */
|
|
873
|
-
readonly materiality_threshold: FloatType;
|
|
874
|
-
/** Raw outcome mean of the treated arm (`none` when the arm is empty). */
|
|
875
|
-
readonly treated_outcome_mean: OptionType<FloatType>;
|
|
876
|
-
/** Raw outcome mean of the control arm (`none` when the arm is empty). */
|
|
877
|
-
readonly control_outcome_mean: OptionType<FloatType>;
|
|
878
|
-
}>>;
|
|
879
|
-
/** Optional precomputed "Validate" recipe ({@link ExperimentDesignType}) for this
|
|
880
|
-
* question; `none` ⇒ compute live via the `design` function (if bound). */
|
|
881
|
-
readonly design: OptionType<StructType<{
|
|
882
|
-
/** The verdict that drove the recommendation (echoed for framing). */
|
|
883
|
-
readonly verdict: VariantType<{
|
|
884
|
-
readonly causal: NullType;
|
|
885
|
-
readonly modest: NullType;
|
|
886
|
-
readonly adjustment_insufficient: NullType;
|
|
887
|
-
readonly non_identifiable_positivity: NullType;
|
|
888
|
-
readonly not_estimable: StringType;
|
|
889
|
-
}>;
|
|
890
|
-
readonly basis: VariantType<{
|
|
891
|
-
/** Clear effect → power the trial to detect the *observed* effect. */
|
|
892
|
-
readonly detect_observed: NullType;
|
|
893
|
-
/** Fuzzy / maybe-nothing → power to the smallest effect worth acting on. */
|
|
894
|
-
readonly resolve_vs_null: NullType;
|
|
895
|
-
/** A trust check failed → randomise to remove the bias adjustment couldn't. */
|
|
896
|
-
readonly de_bias: NullType;
|
|
897
|
-
/** No overlap → randomise within the comparable range. */
|
|
898
|
-
readonly restrict_to_overlap: NullType;
|
|
899
|
-
/** No control group exists → hold back a random sample next time. */
|
|
900
|
-
readonly create_control: NullType;
|
|
901
|
-
}>;
|
|
902
|
-
/** The effect size the trial is powered to detect (observed, or materiality). */
|
|
903
|
-
readonly target_effect: FloatType;
|
|
904
|
-
/** Outcome spread (pooled SD) used to size it. */
|
|
905
|
-
readonly outcome_sd: FloatType;
|
|
906
|
-
readonly target_power: FloatType;
|
|
907
|
-
readonly alpha: FloatType;
|
|
908
|
-
/** Chance the CURRENT sample would already detect `target_effect` (the "you're here" marker); `none` when there's no comparison group. */
|
|
909
|
-
readonly current_power: OptionType<FloatType>;
|
|
910
|
-
/** Categories both groups must be matched on (the most-imbalanced confounders). */
|
|
911
|
-
readonly match_on: ArrayType<StringType>;
|
|
912
|
-
/** Ranked split options (even split first; cost-saving alternates). */
|
|
913
|
-
readonly options: ArrayType<StructType<{
|
|
914
|
-
/** Plain label, e.g. "Even split" / "Treat fewer". */
|
|
915
|
-
readonly label: StringType;
|
|
916
|
-
/** Fraction assigned to the treatment (0..1; 0.5 = even). */
|
|
917
|
-
readonly treated_share: FloatType;
|
|
918
|
-
readonly n_treated: IntegerType;
|
|
919
|
-
readonly n_control: IntegerType;
|
|
920
|
-
readonly n_total: IntegerType;
|
|
921
|
-
}>>;
|
|
922
|
-
/** The detect-chance curve for the chart. */
|
|
923
|
-
readonly power_curve: StructType<{
|
|
924
|
-
readonly n: VectorType<IntegerType>;
|
|
925
|
-
readonly power: VectorType<FloatType>;
|
|
926
|
-
}>;
|
|
927
|
-
/** One generated, plain-language sentence framing the recipe. */
|
|
928
|
-
readonly rationale: StringType;
|
|
929
|
-
}>>;
|
|
930
|
-
}>;
|
|
931
|
-
/** Type alias for {@link ConfigurationType}. */
|
|
932
|
-
export type ConfigurationType = typeof ConfigurationType;
|
|
933
|
-
/**
|
|
934
|
-
* Optional per-column display metadata the developer supplies once. Keyed by
|
|
935
|
-
* column name. Lets the derived prose read "worse" instead of "lower" and show
|
|
936
|
-
* friendly labels / units.
|
|
937
|
-
*/
|
|
938
|
-
export declare const ColumnMetaType: DictType<StringType, StructType<{
|
|
939
|
-
readonly label: OptionType<StringType>;
|
|
940
|
-
readonly unit: OptionType<StringType>;
|
|
941
|
-
readonly higherIsBetter: OptionType<BooleanType>;
|
|
942
|
-
}>>;
|
|
943
|
-
/** Type alias for {@link ColumnMetaType}. */
|
|
944
|
-
export type ColumnMetaType = typeof ColumnMetaType;
|
|
945
|
-
/**
|
|
946
|
-
* A committed experiment in the journal — the framed config + the verdict +
|
|
947
|
-
* headline effect + who committed it when. The renderer derives the verdict
|
|
948
|
-
* words and colour from `verdict` / `adjusted`.
|
|
949
|
-
*/
|
|
950
|
-
export declare const JournalRowType: StructType<{
|
|
951
|
-
readonly config: StructType<{
|
|
952
|
-
readonly treatment: StringType;
|
|
953
|
-
readonly outcome: StringType;
|
|
954
|
-
readonly common_causes: ArrayType<StringType>;
|
|
955
|
-
readonly categorical: OptionType<ArrayType<StringType>>;
|
|
956
|
-
readonly method: OptionType<VariantType<{
|
|
957
|
-
readonly linear_regression: NullType;
|
|
958
|
-
readonly propensity_score_weighting: StructType<{
|
|
959
|
-
readonly weighting_scheme: OptionType<VariantType<{
|
|
960
|
-
readonly ips_weight: NullType;
|
|
961
|
-
readonly ips_stabilized_weight: NullType;
|
|
962
|
-
readonly ips_normalized_weight: NullType;
|
|
963
|
-
}>>;
|
|
964
|
-
}>;
|
|
965
|
-
}>>;
|
|
966
|
-
readonly estimand: OptionType<VariantType<{
|
|
967
|
-
readonly ate: NullType;
|
|
968
|
-
readonly att: NullType;
|
|
969
|
-
readonly atc: NullType;
|
|
970
|
-
}>>;
|
|
971
|
-
readonly refute: OptionType<StructType<{
|
|
972
|
-
/** Permuted-treatment negative control — a real effect should vanish. */
|
|
973
|
-
readonly placebo: BooleanType;
|
|
974
|
-
/** Inject an independent random common cause — the effect should hold. */
|
|
975
|
-
readonly random_common_cause: BooleanType;
|
|
976
|
-
/** Re-estimate on random subsamples — the effect should be stable. */
|
|
977
|
-
readonly data_subset: BooleanType;
|
|
978
|
-
/** Unobserved-confounder strengths to simulate → the sensitivity / tipping curve. */
|
|
979
|
-
readonly sensitivity: OptionType<ArrayType<FloatType>>;
|
|
980
|
-
}>>;
|
|
981
|
-
/** Continuous column for the ALE dose-response curve (the "How much?" view). */
|
|
982
|
-
readonly dose_feature: OptionType<StringType>;
|
|
983
|
-
readonly min_overlap: OptionType<FloatType>;
|
|
984
|
-
readonly min_treatment_variation: OptionType<FloatType>;
|
|
985
|
-
readonly bootstrap: OptionType<StructType<{
|
|
986
|
-
readonly reps: IntegerType;
|
|
987
|
-
readonly cluster_column: OptionType<StringType>;
|
|
988
|
-
readonly confidence_level: OptionType<FloatType>;
|
|
989
|
-
}>>;
|
|
990
|
-
readonly random_state: OptionType<IntegerType>;
|
|
991
|
-
/** Graded-overlap threshold — common support below this keeps `causal` from the
|
|
992
|
-
* top tier (verdict `modest`, `overlap.support_strength = thin`); default 0.55. */
|
|
993
|
-
readonly strong_overlap: OptionType<FloatType>;
|
|
994
|
-
/** Robustness floor — a `causal` verdict whose E-value is below this is downgraded to
|
|
995
|
-
* `modest`. Off by default. (E-value is a monotone transform of the standardized effect.) */
|
|
996
|
-
readonly evalue_floor: OptionType<FloatType>;
|
|
997
|
-
/** Directional prior — a material, CI-clear effect of the opposite sign is flagged
|
|
998
|
-
* (`expected_sign_ok = some(false)`, verdict `adjustment_insufficient`). Off by default. */
|
|
999
|
-
readonly expected_sign: OptionType<VariantType<{
|
|
1000
|
-
readonly positive: NullType;
|
|
1001
|
-
readonly negative: NullType;
|
|
1002
|
-
}>>;
|
|
1003
|
-
}>;
|
|
1004
|
-
readonly verdict: VariantType<{
|
|
1005
|
-
readonly causal: NullType;
|
|
1006
|
-
readonly modest: NullType;
|
|
1007
|
-
readonly adjustment_insufficient: NullType;
|
|
1008
|
-
readonly non_identifiable_positivity: NullType;
|
|
1009
|
-
readonly not_estimable: StringType;
|
|
1010
|
-
}>;
|
|
1011
|
-
readonly naive: FloatType;
|
|
1012
|
-
readonly adjusted: OptionType<FloatType>;
|
|
1013
|
-
readonly committed_at: DateTimeType;
|
|
1014
|
-
readonly committed_by: StringType;
|
|
1015
|
-
/** The `id` of the preset this experiment was framed from (`none` for a
|
|
1016
|
-
* free-form / pre-presets row); the surface renders it as a "from {label}" chip. */
|
|
1017
|
-
readonly preset: OptionType<StringType>;
|
|
1018
|
-
}>;
|
|
1019
|
-
/** Type alias for {@link JournalRowType}. */
|
|
1020
|
-
export type JournalRowType = typeof JournalRowType;
|
|
1021
|
-
/** The journal dataset — committed experiments, newest first. */
|
|
1022
|
-
export declare const JournalType: ArrayType<StructType<{
|
|
1023
|
-
readonly config: StructType<{
|
|
1024
|
-
readonly treatment: StringType;
|
|
1025
|
-
readonly outcome: StringType;
|
|
1026
|
-
readonly common_causes: ArrayType<StringType>;
|
|
1027
|
-
readonly categorical: OptionType<ArrayType<StringType>>;
|
|
1028
|
-
readonly method: OptionType<VariantType<{
|
|
1029
|
-
readonly linear_regression: NullType;
|
|
1030
|
-
readonly propensity_score_weighting: StructType<{
|
|
1031
|
-
readonly weighting_scheme: OptionType<VariantType<{
|
|
1032
|
-
readonly ips_weight: NullType;
|
|
1033
|
-
readonly ips_stabilized_weight: NullType;
|
|
1034
|
-
readonly ips_normalized_weight: NullType;
|
|
1035
|
-
}>>;
|
|
1036
|
-
}>;
|
|
1037
|
-
}>>;
|
|
1038
|
-
readonly estimand: OptionType<VariantType<{
|
|
1039
|
-
readonly ate: NullType;
|
|
1040
|
-
readonly att: NullType;
|
|
1041
|
-
readonly atc: NullType;
|
|
1042
|
-
}>>;
|
|
1043
|
-
readonly refute: OptionType<StructType<{
|
|
1044
|
-
/** Permuted-treatment negative control — a real effect should vanish. */
|
|
1045
|
-
readonly placebo: BooleanType;
|
|
1046
|
-
/** Inject an independent random common cause — the effect should hold. */
|
|
1047
|
-
readonly random_common_cause: BooleanType;
|
|
1048
|
-
/** Re-estimate on random subsamples — the effect should be stable. */
|
|
1049
|
-
readonly data_subset: BooleanType;
|
|
1050
|
-
/** Unobserved-confounder strengths to simulate → the sensitivity / tipping curve. */
|
|
1051
|
-
readonly sensitivity: OptionType<ArrayType<FloatType>>;
|
|
1052
|
-
}>>;
|
|
1053
|
-
/** Continuous column for the ALE dose-response curve (the "How much?" view). */
|
|
1054
|
-
readonly dose_feature: OptionType<StringType>;
|
|
1055
|
-
readonly min_overlap: OptionType<FloatType>;
|
|
1056
|
-
readonly min_treatment_variation: OptionType<FloatType>;
|
|
1057
|
-
readonly bootstrap: OptionType<StructType<{
|
|
1058
|
-
readonly reps: IntegerType;
|
|
1059
|
-
readonly cluster_column: OptionType<StringType>;
|
|
1060
|
-
readonly confidence_level: OptionType<FloatType>;
|
|
1061
|
-
}>>;
|
|
1062
|
-
readonly random_state: OptionType<IntegerType>;
|
|
1063
|
-
/** Graded-overlap threshold — common support below this keeps `causal` from the
|
|
1064
|
-
* top tier (verdict `modest`, `overlap.support_strength = thin`); default 0.55. */
|
|
1065
|
-
readonly strong_overlap: OptionType<FloatType>;
|
|
1066
|
-
/** Robustness floor — a `causal` verdict whose E-value is below this is downgraded to
|
|
1067
|
-
* `modest`. Off by default. (E-value is a monotone transform of the standardized effect.) */
|
|
1068
|
-
readonly evalue_floor: OptionType<FloatType>;
|
|
1069
|
-
/** Directional prior — a material, CI-clear effect of the opposite sign is flagged
|
|
1070
|
-
* (`expected_sign_ok = some(false)`, verdict `adjustment_insufficient`). Off by default. */
|
|
1071
|
-
readonly expected_sign: OptionType<VariantType<{
|
|
1072
|
-
readonly positive: NullType;
|
|
1073
|
-
readonly negative: NullType;
|
|
1074
|
-
}>>;
|
|
1075
|
-
}>;
|
|
1076
|
-
readonly verdict: VariantType<{
|
|
1077
|
-
readonly causal: NullType;
|
|
1078
|
-
readonly modest: NullType;
|
|
1079
|
-
readonly adjustment_insufficient: NullType;
|
|
1080
|
-
readonly non_identifiable_positivity: NullType;
|
|
1081
|
-
readonly not_estimable: StringType;
|
|
1082
|
-
}>;
|
|
1083
|
-
readonly naive: FloatType;
|
|
1084
|
-
readonly adjusted: OptionType<FloatType>;
|
|
1085
|
-
readonly committed_at: DateTimeType;
|
|
1086
|
-
readonly committed_by: StringType;
|
|
1087
|
-
/** The `id` of the preset this experiment was framed from (`none` for a
|
|
1088
|
-
* free-form / pre-presets row); the surface renders it as a "from {label}" chip. */
|
|
1089
|
-
readonly preset: OptionType<StringType>;
|
|
1090
|
-
}>>;
|
|
1091
|
-
/** Type alias for {@link JournalType}. */
|
|
1092
|
-
export type JournalType = typeof JournalType;
|
|
1093
|
-
//# sourceMappingURL=types.d.ts.map
|